Different Header for Sparkling WordPress theme

Hi, I have created a child theme and am trying to create a separate header for the home page only.

I have tired lots of different code methods but none are working, not sure what I am doing wrong. Created a page-home.php template and then also created a header-home.php and then added the below at the header of the page template.

if ( is_front_page() ) {
get_header( ‘header-home’ );
} else {
} ?>

Thank you for any help!

Hi @rosina,

I hope you are well today and thank you for your question.

You are doing it correctly, just change your code slightly as following.

if ( is_home() || is_front_page() ) {
get_header( 'home' );
} else {
} ?>

Then create a file header-home.php in your child theme directory containing code that will display header on home page.

Best Regards,