• My static front page uses php code to display recent posts grouped by category using the function get_posts. I have a third-party-hosted WP using a child of the Twenty Fourteen theme.

    The problem I am now having is recent posts (like published today) are not displaying. When I force a reload with Ctrl-F5, the new posts show up, but then if I do a refresh with F5, it reverts back to not displaying the new posts.

    When I switch it to “Display Recent Posts” instead of “Static Page”. then it shows the newest posts just fine. But when I switch it back to the static home page, it continues to behave as above.

    $args = array( 'posts_per_page' => 12, 'category' => 2 );
    $reviews = get_posts( $args );
    foreach ( $reviews as $post ) : setup_postdata( $post ); 
    
    [display code]
    
    endforeach; 

    This performed just fine until the recent upgrade to 4.7.2, and now it is not.

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘New Posts Not Displayed With get-posts’ is closed to new replies.