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

May 3, 2018 807 views
PHP Development

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

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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!