Website doesn't show next/previous page button php code

Posted May 3, 2018 1.2k views

The code looks like this code

        <div class="clearfix"></div>
        <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
        <div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>
        <?php endif; ?>

It is a pre built website theme for WordPress, the syntax is wrong as i can see. The website used to show the buttons, and suddenly they disappeared. I don’t know how to code so if anyone could help me, I would be more than happy

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
<?php endif; ?>

This line indicates that the lines above it are only shown if the current conditions match the if statement that starts this block. Your buttons are likely not showing up because the if statement that starts this block is returning false.