Support » Themes and Templates » Twenty Fourteen: Assigning featuared content to different page

  • Hi folks,

    I have a question regarding twenty fourteen and I suppose there is a simple answer to it, but I am not getting it:

    How do I get the featured content assigned to a different Page?

    I want my “Home”- Page as front page. In addition I want a “Blog”- Page. Both are assigned to the top menu.
    Since “Home” is assigned as “front page” and “blog” as “post page”, twenty fourteen automatically shows featured content on Home. Yet I want it to be shown on “Blog”, leaving “Home” as a simple static front page without featured content.

    Thanks in advance – Marcus

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have tried editing the page template page.php to following:

    <?php
    	if ( is_posts_page() && twentyfourteen_has_featured_posts() ) {
    		// Include the featured content template.
    		get_template_part( 'featured-content' );
    	}
    ?>

    But that did not have the desired effect.

    Any other ideas?

    Noone?

    This block of code is in both index.php and page.php

    <?php
            if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
                    // Include the featured content template.
                    get_template_part( 'featured-content' );
            }
    ?>

    So to do what you asked for, we have to do 2 things

    All the changes are made via Child Theme (overriding template).
    https://codex.wordpress.org/Child_Themes

    In childtheme version of index.php, and page.php, change is_front_page() to is_home().

    See details here, just above the Examples section.
    https://codex.wordpress.org/Function_Reference/is_home

    Awesome – thanks for your help so far!

    Child Theme created – check!
    is_front_page() renamed to is_home() twice in child-theme-folder – check!

    Front page no Longe displays featured content – check!

    But:
    The “featured content”-script on Blog does not work properly. Instead of displaying grid or slide – the six images are displayed full size under each other.

    Is there a “featured content”-script reference that I have missed somewhere?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twenty Fourteen: Assigning featuared content to different page’ is closed to new replies.