Creating a New Header for the Home Page
-
Was hoping you could help me with this. I have created a new header.php file and named it header-home.php. I added my slider php call there and than created a new page.php file (both files are placed inside my child theme folder) with this code to replace the get_header call:
if(is_page(2)) { get_header('home'); } else { get_header(); }
When I view the homepage in admin mode the url is post=2 so I am assuming that is the post id.
I only want the slider to show on the home page and no other page or post but it isn’t doing what I want. Should I be adding the new get_header code to another file instead?
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Creating a New Header for the Home Page’ is closed to new replies.