How to check if the main page is displayed – is_front_page ()

/, Wordpress/How to check if the main page is displayed – is_front_page ()

How to check if the main page is displayed – is_front_page ()

Often during the customization of the template, the page header needs to contain certain content that should not be visible on the remaining pages. In such cases, a separate page template is not suitable for solving such a problem, and it’s not advisable to make another header template. To do this, you need to check whether the main page is displayed. In general for this there is such a conditional tag:

This tag will work anyway, as for the main static page, and if you have the main page – the page of the latest notes.

By |2018-08-31T14:12:21+00:00August 20th, 2017|Useful hooks, Wordpress|0 Comments

About the Author:

I’ve been doing web development, and freelance for more than 4 years, previously worked 5 years in the banking sector, in the department of IT. I am engaged in the development, refinement and technical support sites and online stores developed in these popular CMS like WordPress and Joomla.

Leave A Comment