Difference between is_home() and is_posts_page

Posted on

is_home() refers to the Posts page regardless of whether it is on the front page or an inner page.

is_posts_page refers to Posts page only when it is an inner page.

As such the if conditionals in the two code blocks at https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination#Offset_.26_Manual_Pagination should ideally be like this:

if ( ! $query->is_posts_page ) {

should be

if ( ! $query->is_home() ) {


if ( $query->is_posts_page ) {

should be

if ( $query->is_home() ) {