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:
1 2 3 | if( is_front_page() ) { //код который нужно отобразить } |
This tag will work anyway, as for the main static page, and if you have the main page – the page of the latest notes.