Next previous image button in wordpress

In wordpress there are two function which will take you in next post from current post.

1.  previous_post_link()

2 . next_post_link()

we can pass the image code so the link will become a image link .

and last parameter in below code is set as true which will take user in same category post .

If there is no more post in same category no next/prev button will display in the page .

 previous_post_link(‘%link’, ‘<img src=”‘.get_bloginfo( ‘template_directory’ ).’/images/lbar.jpg” alt=”Previous” />’,TRUE)

 

 next_post_link(‘%link’, ‘<img src=”‘.get_bloginfo( ‘template_directory’ ).’/images/rbar.jpg” alt=”Previous” />’,TRUE)

 

Hope this information will give your blog a nicer looks .

 

 

CyberChimps Inc

Show Buttons
Hide Buttons