• Resolved ogdengroup

    (@ogdengroup)


    Hello! I have just installed this theme, and the header, front page, and footer all show up but none of the Featured Content or Blog Posts show up. I have uninstalled my WP instance and reinstalled, still nothing. What am I missing? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi! Please open the Settings page in your admin area-> Reading-> “Front page displays” option-> select “A static page (select below)”-> choose the desired Home page in the list under this option-> save changes. Then please go to Pages-> All Pages-> open the needed page in the editor-> “Page Attributes” block with page settings-> choose template “Posts With Featured Content” for the required page.

    Thread Starter ogdengroup

    (@ogdengroup)

    Great, thanks! I love the theme!

    Hi –

    Is it possible for this option (i.e. having the featured content) but without the posts please?

    Hi –

    Is it possible for this option (i.e. having the featured content) but without the posts please?

    Yes it is possible and I have managed to do this on my site whihc is in development.

    https://wordpress2015.wilddogworld.com/wordpress/

    To do this, best practice is to create a child theme and then modify the ‘extras.php’ file. Change line 105

    `if ( ! is_front_page() || ! is_page_template( ‘home-page.php’ ) ) {
    return;
    }`

    …by adding a new php home page template in you child page folder and giving your own name. Modify the line of code above to match.

    eg. my-homepage.php

    The code would look like this:

    <?php
    /**
     * Template Name: My Homepage
     *
     * @package refur
     */
    
    get_header(); ?>
    
    	<div id="primary" class="content-area col-xs-12">
    		<main id="main" class="site-main" role="main">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'template-parts/content', 'page' ); ?>
    
    				<?php
    					// If comments are open or we have at least one comment, load up the comment template.
    					if ( comments_open() || get_comments_number() ) :
    						comments_template();
    					endif;
    				?>
    
    			<?php endwhile; // End of the loop. ?>
    
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>

    All good, you end up with the featured content and your own homepage content rather then some posts. The featured content is injected into the header area by some other php code elsewhere in the theme.

    However, I ran into an issue whereby the theme does not seem to recognise the modified extras.php file in the child theme folder so I have had to modify the parent page to make this change. Not ideal. I am not a code warrior by any means and it has taken me hours to figure this lot out!

    I’d like to hear form teFOX on a better way of doing this…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Missing Featured Content?’ is closed to new replies.