Catalin Catalin - 5 months ago 15x
HTML Question

Wordpress custom header issue

I have created a template in wordpress for the home page, named: page-home-slider.php
I have chosen the home page to take that custom template.
Until here everything works fine.

Then I have created header-home.php, so a custom header for my home page.
Then in page-home-slider.php I have coded: get_header("home");

Now, when I access the home page from browser, the default header is displayed first and under it, my custom header. Is this normal? I wanted to have just my custom header. Please tell me what I am doing wrong.

PS: I am using JobRoller template if it matters somehow.
sample picture


As discussed in the comments, you could set a condition in header.php that checks if the requested page has the template using the is_page_template() function:


if ( is_page_template( 'page-home-slider.php' ) )
   // do something different

Still, you need to check where get_header() is getting called to avoid duplicates.