• Resolved taywur

    (@taywur)


    I’m attempting to edit a layout on this website:
    http://twoweeks.taylorbandy.com

    None of my recent posts are showing up. It shows my very first post I made and that’s it (it’s like this on the categories page too). I’ve checked the reading settings (it’s set to show my latest posts), and I currently do not have any plugins installed.

    I’m not quite sure where I went wrong while I was coding. Does anyone have a solution? I would greatly appreciate it!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter taywur

    (@taywur)

    I should also add that this is the coding I have on my index.php page:

    <?php if(have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    <?php endwhile; ?>
    <h1><?php the_title(); ?></h1>
    <?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?>
     || <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    
    <?php the_content(); ?>
    <br><br>Filed under: <?php the_category(', '); ?><br>
    <?php posts_nav_link(); ?>

    Try removing the first two lines on your code above.

    Then add this code on top:

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

    Add this one on the bottom:

    <?php endwhile; endif; ?>

    Also make sure that the option Blog pages show at most on your reading settings is set to more than 1.

    Thread Starter taywur

    (@taywur)

    Hi, ronangelo! I’ve actually tried that code already. I continue to get this error:
    ‘Parse error: syntax error, unexpected T_ELSE in /wp-content/themes/infernal/index.php on line 32’

    Also, my reading setting is set to show more than 1 (it’s set to 5 right now).

    Could you post your entire index.php? If it’s too long, try posting it to Pastebin and posting the link here.

    Thread Starter taywur

    (@taywur)

    Sure! Here’s the pastebin link:
    Click here

    Try to move <?php endwhile; ?> from line 19 to immediately before <?php else : ?> on line 31.

    Thread Starter taywur

    (@taywur)

    That worked! Thank you so much!

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

The topic ‘New Posts Don't Show Up’ is closed to new replies.