• Resolved smartbrunette

    (@smartbrunette)


    I wanted the “featured posts” to show above the blog posts on the home page. I’m not sure what I did wrong, but now suddenly I can no longer see blog posts on the front page. Have tried debugging and following code progression, but no luck. I even tried to add a new set of fields to the customizer (Kirki) but the elara_get_option() function won’t recognize the variable I’m passing in. Pulling my hair out! I really would like to be able to display just three blog posts (of a category I select) on the home page, UNDER the featured categories. Possible?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @smartbrunette,

    Thanks for getting in touch, and thank you for using Elara!

    It looks like you were able to accomplish this now, with the three blog posts showing under the featured section, is that correct? If so, nice work! ??

    Thanks again for reaching out, and if you need anything else please let us know.

    Thread Starter smartbrunette

    (@smartbrunette)

    Yes I was ! I had to make an amendment to feed.php : `
    $args=array(‘category__in’ => 24);
    $query = new WP_Query( $args );
    if ( $query->have_posts() ) :

    while ( $query->have_posts() ) :

    $query->the_post();
    get_template_part( ‘content’, get_post_format() );

    endwhile;
    endif;`

    and I moved the code to display the featured categories up right below the banner display:

    if ( is_front_page() && ! is_paged() ) :
    									get_template_part( 'parts/frontpage', 'banner' );
    								
    								endif;
    						if ( is_front_page() && ! is_paged() ) :
    								get_template_part( 'parts/frontpage', 'featured-categories' );
    							endif;

    thank you!

    Ah…gotcha- thanks for sharing! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blog posts not showing on front page’ is closed to new replies.