get_adjacent_post() – Function description, parameters and basic usage

Description:

get_adjacent_post – A WordPress function to retrieve previous or next post. It is mostly useful if you want to integrate go to next/previous post button in your WordPress theme.

Parameters:

$in_same_cat(optional)(boolean) – If you want to retrieve next/previous post from same category

$excluded_categories (optional)(string) – String of comma-separated category ids

$previous(optional)(boolean) – If you want to retrieve previous post

Basic usage examples:

About Pavel Petrov 2 Articles |  17 How-tos

Pavel is a senior developer for the last 7 years, with extended interest in Linux administration, WordPress and Symfony.


Be the first to comment

Leave a Reply

Your email address will not be published.


*