Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_next_post [ WordPress Function ]

get_next_post ( $in_same_cat = false, $excluded_categories = '' )
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.
Returns:
  • (mixed) Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
Defined at:



Retrieve next post that is adjacent to current post.

Source


<?php
function get_next_post($in_same_cat false$excluded_categories '') {
    return 
get_adjacent_post($in_same_cat$excluded_categoriesfalse);
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics