WP_Query::is_home()

Is the query for the blog homepage?


Description Description

This is the page which shows the time based blog content of your site.

Depends on the site’s "Front page displays" Reading Settings ‘show_on_front’ and ‘page_for_posts’.

If you set a static page for the front page of your site, this function will return true only on the page you set as the "Posts page".

See also See also


Top ↑

Return Return

(bool) True if blog view homepage.



Top ↑

Source Source

File: wp-includes/class-wp-query.php

	public function is_home() {
		return (bool) $this->is_home;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.