• mupamupa

    (@mupamupa)


    I simply love this theme (and the suppost it gets)
    I need to make different featured pages show in internal pages as well, not just in the home page.
    Following the instructions
    OVJ6pHMN&gg*themesandco.com/snippet/featuring-pages-another-page-post-home/
    I constantly get an error.
    Is is still possible to use thes cod with Customizr 3.3.1?

Viewing 1 replies (of 1 total)
  • Thread Starter mupamupa

    (@mupamupa)

    that is what I do:

    add_filter ( ‘tc_show_fp’ , ‘my_fp_boolean_condition’);

    function my_fp_boolean_condition ($show_fp) {

    //this checks if there are featured pages defined in the theme options in database and if your conditional tag returns a true value

    return 0 != esc_attr( tc__f( ‘__get_option’ , ‘tc_show_featured_pages’ )

    && is_page( 713 );

    }

    add_filter(‘tc_fp_link_url’ , ‘my_custom_fp_links’, 10 ,2);

    function my_custom_fp_links( $original_link , $fp_id ) {

    //assigns a custom link by page id

    $custom_link = array(

    //page id => ‘Custom link’

    59 => ‘https://www.mywebsite.com/1’,

    61 => ‘https://www.mywebsite.com/2’,

    272 => ‘https://www.mywebsite.com/3’

    );

    foreach ($custom_link as $page_id => $link) {

    if ( get_permalink($page_id) == $original_link && is_page(713)) //<= this new condition ( is_page(713) forces the code to be applied only for this page (it should be the id of the page where you’ve moved or duplicated your featured pages)

    return $link;

    }

    //if no custom title is defined for the current page id, return original

    return $original_link;

    }

Viewing 1 replies (of 1 total)
  • The topic ‘Customizr Featured Pages on any page’ is closed to new replies.