Skip to main content
front page was change to homepage in https://github.com/WordPress/WordPress/commit/a74e98d7be4ef1cac36e08092a54aa53f27c9e51
Source Link
fuxia
  • 106.8k
  • 37
  • 251
  • 454

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displaysSettings->Reading->Your homepage displays

So if you set about us as the front page then this conditional will only be true if showing the about usabout us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Your homepage displaysYour homepage displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called NewsNews.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.
front page was change to homepage in https://github.com/WordPress/WordPress/commit/a74e98d7be4ef1cac36e08092a54aa53f27c9e51
Source Link

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Front>Your pagehomepage displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under FrontYour pagehomepage displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Front page displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Front page displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.
Source Link
Scott
  • 12.3k
  • 15
  • 68
  • 99

is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Front page displays

So if you set about us as the front page then this conditional will only be true if showing the about us page.

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.

If the settings under Front page displays are left at default then the home page will return true for both is_front_page() and is_home()

An example of using is_home():

  • You have set your posts page to a page called News.
  • A user navigates there and in the header you want to show additional navigation
  • You could use is_home() to do this.