Different header on page template

I would like to use different header on my page.php. so on my page.php i am loading :smile:

<?php get_template_part('templates/header-page'); ?>

but how to hide the default header from page.php. i know that something has to be changed ion base.php.


If you replace the existing get_template_part() call with your own then you do not need to do anything else.

but i want to use on home page: get_template_part(‘templates/header’);
and on other pages like page.php this <?php get_template_part('templates/header-page'); ?>

how can i disable to use get_template_part(‘templates/header’); from base.php just on page.php

<?php get_template_part('templates/header', (is_page()) ? 'page' : ''); ?>

thanks Foxaii. solved

    if (is_page('Home')) { 
    } else {
1 Like