-4

Can anyone walk me through the exact steps?

I want to create two buttons that sit next to each other at the bottom of a post for the NEXT and PREVIOUS posts...I want to be able to insert this manually (html), and using a style/class to do it.

I'm assuming I have to do something in the functions.php file first? Then create a custom CSS button? Then add the code in the bottom of my post?

0

This is standard WordPress functionality, contained in previous_post_link and next_post_link. You don't need to edit functions.php. Just add to your template:

<div class="buttons">
  <span class="previous-button"><?php previous_post_link() ?></span>
  <span class="next-button"><?php next_post_link() ?></span>
</div>

Now you can style the buttons with css. Follow the codex links for customizing options to the functions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.