Help with "IF / ELSE"
-
OK, we have this code to display next and previous articles in the sidebar on a website we are working on:
<h3><?php _e('Next Article') ?></h3> <p><?php next_post_link('<p>%link</p>'); ?></p> <h3><?php _e('Previous Article') ?></h3> <p><?php previous_post_link('<p>%link</p>'); ?></p>
What we need to do is alter this so that “if” there is a Next Article, it shows the h3 and p, “else” it should display nothing at all . . . same with the Previous Article.
Any ideas? Thanks in advance! 🙂
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Help with "IF / ELSE"’ is closed to new replies.