WordPress.org

Ready to get started?Download WordPress

Forums

Posts are not appearing on homepage (4 posts)

  1. Vincent_Karma
    Member
    Posted 1 year ago #

    I'm trying out two responsive photo themes that I really like called, "Grid Theme Responsive" and "Simple Grid Theme Responsive". However, when I create a new post, it does not appear on the homepage. When I switch the theme to "Twenty Twelve", they appear. Here is what I have done so far to troubleshoot:

    - I uninstalled and reinstalled each theme
    - I cleared the Cashe
    - I renamed an index.html file in my root folder (Someone had suggested that it was causing an issue with the WP index.php file).
    - Disabled the plugins

    I really don't know what else to do and I would really like to use one of these themes. Any suggestions or assistance would be greatly appreciated. Thank you!

  2. riversatile
    Member
    Posted 1 year ago #

    I suggest you to inspect the code in the both template files (index.php and single.php).

  3. Vincent_Karma
    Member
    Posted 1 year ago #

    These files look alright to me. Is there anything specific I should be looking for?

  4. riversatile
    Member
    Posted 1 year ago #

    To display at least one post, a PHP template need to have the if statement with the WordPress have_posts() function :

    It looks like this :

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    ...

    This is the loop.Always, the loop ends with :

    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    Do you have that kind of code in the index.php of your theme ?

Topic Closed

This topic has been closed to new replies.

About this Topic