• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Code Examples Using Different Next and Previous Post Link Parameters

This tutorial contains examples of code which include the 5 different parameters you can customize with both the next_post_link and previous_post_link template tags.

The 5 parameters are:

  1. format – Default: « %link
  2. link – Default: %title
  3. in_same_term – Default: false
  4. excluded_terms – Default: None
  5. taxonomy – Default: ‘category’

Example 1

The 1st example shows the previous and next posts entry titles and links all posts in all categories.

Register for full access

get_the_post_navigation() and the_post_navigation() for navigation to the next and previous post.
get_the_posts_navigation() and the_posts_navigation()` for navigation to the next and previous page of posts.
get_the_pagination() and the_pagination() for paginated navigation between pages of posts. Uses paginate_links().

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.