Advertisements

get_next_post

Definition:
function get_next_post($in_same_cat = false, $excluded_categories = '') {}

Retrieve next post that is adjacent to current post.

Parameters

  • 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 values

returns:Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.

Source code

function get_next_post($in_same_cat = false, $excluded_categories = '') {

	return get_adjacent_post($in_same_cat, $excluded_categories, false);

}

1498

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: