Advertisement
salmancreation

How to Next and previous post images

Aug 4th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. How to Next and previous post images
  2. Adding this PHP code to your wordpress theme will display image links for your next and previous posts. Upload images to your theme with the name next.png and prev.png.
  3.  
  4. <?php
  5.            next_post_link( '%link', '<img src="' . get_bloginfo('stylesheet_directory') . '/img/prev.png" />');
  6. ?>
  7. <?php
  8.            previous_post_link('%link', '<img src="' . get_bloginfo('stylesheet_directory') . '/img/next.png" />' );
  9.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement