Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • pepoterjackson
    Member
    Post count: 8

    Ok, thank you!

    pepoterjackson
    Member
    Post count: 8

    ok, this is the code, but how can I insert it in the child theme?

    /* Post Meta Box
    ================================================== */
    $meta_boxes[] = array(
    ‘id’ => ‘post_meta_box’,
    ‘title’ => __(‘Post Meta’, ‘swift-framework-admin’),
    ‘pages’ => array( ‘post’ ),
    ‘context’ => ‘normal’,
    ‘fields’ => array(

    // CUSTOM EXCERPT SECTION
    array (
    ‘name’ => ”,
    ‘title’ => __(‘Custom Excerpt’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}heading_custom_excerpt”,
    ‘type’ => ‘section’
    ),

    // CUSTOM EXCERPT
    array(
    ‘name’ => __(‘Custom excerpt’, ‘swift-framework-admin’),
    ‘desc’ => __(“You can optionally write a custom excerpt here to display instead of the excerpt that is automatically generated. If you use the page builder, then you’ll want to add content to this box.”, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}custom_excerpt”,
    ‘type’ => ‘textarea’,
    ‘std’ => “”,
    ‘cols’ => ’40’,
    ‘rows’ => ‘8’,
    ),

    // MAIN DETAIL SECTION
    array (
    ‘name’ => ”,
    ‘title’ => __(‘Main Detail Options’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}heading_detail”,
    ‘type’ => ‘section’
    ),

    // PAGE HEADER TYPE
    array(
    ‘name’ => __(‘Post Header Type’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}page_header_type”,
    ‘type’ => ‘select’,
    ‘options’ => array(
    ‘standard’ => __(‘Standard’, ‘swift-framework-admin’),
    ‘naked-light’ => __(‘Naked (Light)’, ‘swift-framework-admin’),
    ‘naked-dark’ => __(‘Naked (Dark)’, ‘swift-framework-admin’),
    ),
    ‘multiple’ => false,
    ‘std’ => ‘standard’,
    ‘desc’ => __(‘Choose the type of header that is shown on this post. NOTE: The naked options are only possible when you have the fancy heading enabled, or the media display below set to “Full Width with Title Overlay”.’, ‘swift-framework-admin’),
    ),

    // FULL WIDTH MEDIA
    array(
    ‘name’ => __(‘Media Display’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}fw_media_display”,
    ‘type’ => ‘select’,
    ‘options’ => array(
    ‘fw-media-title’ => __(‘Full Width with Title Overlay’, ‘swift-framework-admin’),
    ‘fw-media’ => __(‘Full Width’, ‘swift-framework-admin’),
    ‘standard-above’ => __(‘Standard (Above content)’, ‘swift-framework-admin’),
    ‘standard’ => __(‘Standard’, ‘swift-framework-admin’),
    ),
    ‘multiple’ => false,
    ‘std’ => ‘standard’,
    ‘desc’ => __(‘Choose how you would like to display your selected media – full width (edge to edge) with or without the title overlay, or standard. If you choose the title overlay option, it is recommended that you hide the page title in the page title meta options.’, ‘swift-framework-admin’)
    ),

    // MEDIA IMAGE HEIGHT
    array(
    ‘name’ => __(‘Title Overlay Min Height’, ‘swift-framework-admin’),
    ‘id’ => $prefix . ‘media_height’,
    ‘desc’ => __(“If you are using the ‘Full Width with Title Overlay’ media display type, you can set a min-height for it here (no px).”, ‘swift-framework-admin’),
    ‘clone’ => false,
    ‘type’ => ‘text’,
    ‘std’ => ‘500’,
    ),

    // TITLE OVERLAY TEXT COLOR
    array(
    ‘name’ => __(‘Title Overlay Text Color’, ‘swift-framework-admin’),
    ‘id’ => $prefix . ‘title_overlay_text_color’,
    ‘desc’ => __(“Optionally set a text color for the title overlay text.”, ‘swift-framework-admin’),
    ‘type’ => ‘color’,
    ‘std’ => ”,
    ),

    // CONTENT FORMATTING
    array(
    ‘name’ => __(‘Extra Paragraph Spacing’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}extra_paragraph_spacing”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Check this box to enable extra spacing around paragraph elements within the post content.’, ‘swift-framework-admin’),
    ‘std’ => 0,
    ),

    // INCLUDE AUTHOR INFO
    array(
    ‘name’ => __(‘Include author info’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}author_info”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Check this box to show the author info box on the detail page.’, ‘swift-framework-admin’),
    ‘std’ => $default_include_author,
    ),

    // INCLUDE SOCIAL SHARING
    array(
    ‘name’ => __(‘Include social sharing’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}social_sharing”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Check this box to show social sharing icons on the detail page.’, ‘swift-framework-admin’),
    ‘std’ => $default_include_social,
    ),

    // INCLUDE AUTHOR INFO
    array(
    ‘name’ => __(‘Remove article pagination’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}remove_next_prev”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Check this box to remove the next/previous article pagination on the detail page.’, ‘swift-framework-admin’),
    ‘std’ => 0,
    ),

    // INCLUDE RELATED ARTICLES
    array(
    ‘name’ => __(‘Include related articles’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}related_articles”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Check this box to show related articles on the detail page.’, ‘swift-framework-admin’),
    ‘std’ => $default_include_related,
    ),

    // MISC
    array (
    ‘name’ => ”,
    ‘title’ => __(‘Misc. Options’, ‘swift-framework-admin’),
    ‘id’ => “{$prefix}heading_detail”,
    ‘type’ => ‘section’
    ),

    // Extra Page Class
    array(
    ‘name’ => __(‘Extra page class’, ‘swift-framework-admin’),
    ‘id’ => $prefix . ‘extra_page_class’,
    ‘desc’ => __(“If you wish to add extra classes to the body class of the page (for custom css use), then please add the class(es) here.”, ‘swift-framework-admin’),
    ‘clone’ => false,
    ‘type’ => ‘text’,
    ‘std’ => ”,
    ),

    // REMOVE PROMO BAR
    array(
    ‘name’ => __(‘Remove promo bar’, ‘swift-framework-admin’), // File type: checkbox
    ‘id’ => “{$prefix}remove_promo_bar”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Remove the promo bar at the bottom of the page.’, ‘swift-framework-admin’),
    ‘std’ => 0,
    ),

    // REMOVE TOP SPACING
    array(
    ‘name’ => __(‘Remove top spacing’, ‘swift-framework-admin’), // File type: checkbox
    ‘id’ => “{$prefix}no_top_spacing”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Remove the spacing at the top of the page.’, ‘swift-framework-admin’),
    ‘std’ => 0,
    ),

    // REMOVE BOTTOM SPACING
    array(
    ‘name’ => __(‘Remove bottom spacing’, ‘swift-framework-admin’), // File type: checkbox
    ‘id’ => “{$prefix}no_bottom_spacing”,
    ‘type’ => ‘checkbox’,
    ‘desc’ => __(‘Remove the spacing at the bottom of the page.’, ‘swift-framework-admin’),
    ‘std’ => 0,
    )

    )
    );

    Thank you very much for your help!

    pepoterjackson
    Member
    Post count: 8

    As I can make the settings the default image for all the blog post.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Menu #108196
    pepoterjackson
    Member
    Post count: 8

    Hi there.

    Had the same problem and the patch worked or mobile menu. I have found that if you add the URL #, works perfectly, I hope you might help us all.

    Greetings and thanks for this great theme.

    pepoterjackson
    Member
    Post count: 8

    Hi Laranz.

    Thanks for your help, it works perfect!.

    Thanks very much!

    pepoterjackson
    Member
    Post count: 8

    archive functions.php

    Attachments:
    You must be logged in to view attached files.
    pepoterjackson
    Member
    Post count: 8

    Hi,

    The code in the child theme:

    <?php

    /*
    *
    * Cardinal Functions – Child Theme
    * ————————————————
    * These functions will override the parent theme
    * functions. We have provided some examples below.
    *
    *
    */

    /* LOAD THEME LANGUAGE
    ================================================== */
    /*
    * You can uncomment the line below to include your own translations
    * into your child theme, simply create a “language” folder and add your po/mo files
    */

    // load_theme_textdomain(‘swiftframework’, get_stylesheet_directory_uri().’/language’);

    /* REMOVE PAGE BUILDER ASSETS
    ================================================== */
    /*
    * You can uncomment the line below to remove selected assets from the page builder
    */

    // function spb_remove_assets( $pb_assets ) {
    // unset($pb_assets[‘parallax’]);
    // return $pb_assets;
    // }
    // add_filter( ‘spb_assets_filter’, ‘spb_remove_assets’ );

    /* ADD/EDIT PAGE BUILDER TEMPLATES
    ================================================== */
    function custom_prebuilt_templates($prebuilt_templates) {

    /*
    * You can uncomment the lines below to add custom templates
    */
    // $prebuilt_templates[“custom”] = array(
    // ‘id’ => “custom”,
    // ‘name’ => ‘Custom’,
    // ‘code’ => ‘your-code-here’
    // );

    /*
    * You can uncomment the lines below to remove default templates
    */
    // unset($prebuilt_templates[‘home-1’]);
    // unset($prebuilt_templates[‘home-2’]);

    // return templates array
    return $prebuilt_templates;

    }
    //add_filter( ‘spb_prebuilt_templates’, ‘custom_prebuilt_templates’ );

    /* POST SHARE
    ================================================== */
    if (!function_exists(‘sf_post_share’)) {
    function sf_post_share() {
    $image = wp_get_attachment_url(get_post_thumbnail_id());
    $share_text = apply_filters(‘sf_post_share_text’, __(“Share this”, “swiftframework”));
    ?>

    <?php edit_post_link(‘ Editar anuncio’, ‘<p><i class=”fa fa-pencil-square-o”></i>’, ‘</p>’); ?>

    <div class=”article-divider”></div>
    <div class=”article-share” data-buttontext=”<?php echo $share_text; ?>” data-image=”<?php echo $image; ?>”></div>
    <?php }
    }
    add_action(‘sf_post_content_end’, ‘sf_post_share’, 30);
    /* END POST SHARE
    ================================================== */

    /* POST INFO
    ================================================== */
    if (!function_exists(‘sf_post_info’)) {
    function sf_post_info() {
    global $post;
    $author_info = sf_get_post_meta($post->ID, ‘sf_author_info’, true);
    if (is_singular(‘directory’)) {
    $author_info = true;
    }
    $post_categories = get_the_category_list(‘, ‘);
    ?>

    <?php if ($author_info) { ?>
    <div class=”author-info-wrap clearfix”>
    <div class=”author-avatar”><?php if(function_exists(‘get_avatar’)) { echo get_avatar(get_the_author_meta(‘ID’), ‘140’); } ?></div>
    <div class=”author-bio”>
    <div class=”author-name” itemprop=”author” itemscope itemtype=”http://schema.org/Person”><h3 class=”vcard author”><span itemprop=”name” class=”fn”><?php the_author_meta(‘display_name’); ?></span></h3></div>
    <div class=”author-bio-text”>
    <?php the_author_meta(‘description’); ?>
    </div>
    </div>
    </div>
    <?php } ?>
    <?php if ($author_info) { ?>
    <div class=”post-info clearfix”>
    <?php } else { ?>
    <div class=”post-info post-info-fw clearfix”>
    <?php } ?>

    <?php if ($post_categories) { ?>
    <div class=”categories-wrap”><?php _e(“Categorias:”, “swiftframework”); ?>
    <span class=”tags”><?php echo sprintf(__(‘%1$s%3$s’), $author_name, $author_url, $post_categories); ?></span></div>
    <?php } ?>

    <?php if (has_tag()) { ?>
    <div class=”tags-wrap”><?php _e(“Tags:”, “swiftframework”); ?><span class=”tags”><?php the_tags(”); ?></span></div>
    <?php } ?>
    <div class=”comments-likes”>
    <?php if ( comments_open() ) { ?>
    <div class=”comments-wrapper”><i class=”ss-chat”></i><span><?php comments_number(__(‘0 Comments’, ‘swiftframework’), __(‘1 Comment’, ‘swiftframework’), __(‘% Comments’, ‘swiftframework’)); ?></span></div>
    <?php } ?>
    <?php if (function_exists( ‘lip_love_it_link’ )) {
    lip_love_it_link(get_the_ID(), true, ‘text’);
    } ?>
    </div>
    </div>
    <?php }
    }
    add_action(‘sf_post_content_end’, ‘sf_post_info’, 40);

    /* END POST INFO
    ================================================== */

    /* DISMISS NOTICE
    ================================================== */

    add_filter(‘get_user_metadata’, function($val, $object_id, $meta_key, $single)
    {
    if($meta_key === ‘tgmpa_dismissed_notice’)
    return true;
    else
    return null;

    }, 10, 4);

    /* END DISMISS NOTICE
    ================================================== */

    ?>

    pepoterjackson
    Member
    Post count: 8

    ERROR

    Parse error: syntax error, unexpected T_FUNCTION in /xxxxx/wp-content/themes/cardinal-child/functions.php on line 62

Viewing 8 posts - 1 through 8 (of 8 total)