get_next_post Wordpress function


Retrieve next post that is adjacent to current post.



(bool) $in_same_cat Optional. Whether post should be in a same category.
(array|string) $excluded_categories Optional. Array or comma-separated list of excluded category IDs.

Return Type:

(mixed) Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.

Define At:


Wordpress Reference URL:

0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×