Skip to content

1fix.io

One step at a time

get_adjacent_post

Get the right prev/next post link when order posts by menu_order

September 9, 2014 by Yoren Chang

There are 2 functions in WordPress to let you display previous and next post links: previous_post_link and next_post_link. In general, they work so well and really save a bunch time when coding a theme. Recently in one of my projects, I created several custom post types, and made the posts ordered by menu_order. In such …

Read more

Categories Gist Tags get_adjacent_post 46 Comments
© 2023 1fix.io • Built with GeneratePress
  • Work With me
    • About Me
    • DEV.to
  • Freelance Better
  • WordPress Plugins
    • Completely Delete
    • Unsortable Meta Box
    • Media Search Enhanced
    • Custom Featured Image Metabox
    • Quick Add Child
    • Categories Metabox Enhanced
  • AngularJS WordPress Theme