Featuring pages on another page / post than home


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Let’s say you’ve setup three beautiful featured pages on your home page. Now you might want to display this block of featured pages in another post or page of your website.

This snippet will show you how to do it.

 

Note : Customizr-Pro and Featured Pages Unlimited users should replace __get_option with __get_fpc_option and tc_show_featured_pages with tc_show_fp

Move your home featured pages in another page / post

In the following example, I move featured page from home to page with id #47.

 

 

Duplicate your home featured pages in other pages/posts

In this example, I duplicate the featured pages to three different pages with ids #47, # 48, #49.

 

 

Useful resources :


Related Snippets you may also like


38 thoughts on “Featuring pages on another page / post than home

  • Viji

    Hello Nicolas,

    Thank you for the above code snippet for featured pages.

    My goal is to have a couple of my internal sub pages (not all of them) to look like the front page with the feature page links.
    So, I tried the code above for duplicating the featured page in other pages.

    But the featured page links in my Front Page are gone now and appear in the sub pages where I want them. How to get the links back in my Front page?

    Any help is greatly appreciated. I’m using Customizr Pro, latest version.
    Thanks

  • Asool D.

    Hi there,

    I added the code under “Duplicate your home featured pages in other pages/posts” to my child theme’s functions.php , and this broke my website. Does this have anything to do with the customizr theme being updated?

    Asool

  • Miriam

    Hi,
    I have been looking over the responses on this forum and tried most of them but I cannot seem to find a solution to my problem. I would like to have featured pages appear on another page, I want the featured pages to be different than the ones that are on my home page. I managed to get the featured page bubbles on another page, but they no longer appeared on my home page and I was not able to change which pages appeared. I know this topic has been discussed before but I really cannot figure this out. I’m a total newbie at WordPress by the way.
    Thank you!

  • Moh

    Dear Nicolas,

    We would like to add more featured pages to different pages and this is great – we can use code above. However, we would like to use different images, links and titles for different pages. Basically we need FP design on another page but with all different info. How do we do this?

    Thanks,
    Moh

  • Guy Bodger

    Dear Nicolas,

    Many thanks for responding so quickly.

    I’ve tried this code and the home page seems to work but the FPs don’t appear on any other pages. In customise theme I’ve tried to set the FPs to be in other places and if I set ‘Before Footer’ the FPs don’t appear.

    Any ideas what is wrong?

    One other question I’d like the FPs to be all the same height irrespective of how much text they have in them, how do I change the code to do this please?

    Many thanks
    Guy

  • Guy Bodger

    Hello Nicolas,
    I’ve bought your plugin for my Customizr theme and thought that it would be easy to duplicate my home page featured pages to all my sites pages and product pages (i’m using Woocommerce) but whatever I try to do give the wrong result.

    First I tried using the custom location and added the to my theme header and that was fine for the home page but when I put this code into my functions.php:

    add_filter ( ‘tc_show_fp’ , ‘move_fp_from_home_to_somewhere’);
    function move_fp_from_home_to_somewhere () {
    //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( 47 );
    }
    The featured pages appear before the page text, which is obvious really as they appear before an text on the home page!

    So I’d like to have the featured pages appear just before the footer (I’ve had no luck getting this to work for me).
    Can you help please?
    Thanks
    Guy

    • Nicolas Post author

      Hi Guy,

      Here’s the code you need to :
      1) display featured pages in a custom location on home
      2) display the same set of FP in another custom location on other pages

      Hope this helps!

      • Guy Bodger

        Hello Nicolas,

        I’ve found the problem with my code not working. It was my fault and your code works fine. What I did do is remove the code to re-position the Featured Pages (Starts here: add_action( ‘wp_head’ , ‘change_fp_location’, 100 );) and this is excellent as I can use the Customize option in my child them to manage the Featured Pages which now appear on all pages.
        It would be very helpful for me in a future version to be able to have maybe 3 or 4 sets of Featured Pages that I can display on different types of pages e.g. pages, posts, products (I use Woocommerce), home page – I hope you can do this soon.

        Thanks
        Guy

  • Farz

    Hi

    Thank you for the above code. I like to duplicate the featured pages to 404 not found page. At the moment there is quotation on top of the 404 page from George Orwell and then the search box. Ideally I would like to add the featured pages below the search box.

    Thank you for your help.

    Best regards

    • Nicolas Post author

      Hi Farz,
      You can modify the snippet this way to display your featured pages in the 404 page.

      Then, to move the FP below the search box, you’ll need to modify their initial hook like in the following example.

      I hope this will help you achieve what you need!

  • Istvan

    Hey,

    First of all, thanks a lot for this great theme and the code snippets, they’ve helped me a great deal to get started with wordpress!
    I see that these snippets move or duplicate the featured pades, but what if I want to feature different pages on yet a different page?
    Is it also possible?

    • Nicolas Post author

      Hi Steve, you can change the featured pages id with the filter named : tc_fp_id and defined as follow in the core code :

      Hope this will help you.

  • David Abate

    Thanks for this code. When I used it, the images above the Featured Pages are not showing. Any ideas?

  • Vogel

    Hi,

    so far i have dublicated the featured pages to another page, which worked fine and moreover changed the linked content but is there a way to also change the featured image, text and button to the newly linked page? Right now the images, text and button refer to the old link but clicking on them leads to the new page.
    I already found the “different texts on the Featured Pages Buttons” snipped, but that one is changing the text of the buttons generally and not only the one of the dublication .
    I would be very thankful for some help.
    Regards

  • Julien Viney

    Hi, i would like to put different page links than the homepage links on the others pages.
    I don’t know at all how to do it, is it even possible ?

    • Nicolas Post author

      Hi Julien,
      As described in this snippet, you can customize your featured pages links with this code :

      Now if you need to customize the links of featured pages on other pages than home, just add a conditional tag in the callback function (my_custom_fp_link() ). For example :

      Hope this will help

Comments are closed.