Custom header for certain page – PHP help
-
Hey there, hope you’re having an awesome day.
Reading on how to change the header for a certain page, I stumbled upon this following code I should add to my custom page template:
<?php if (is_page('pagename')) { ?> <img src="<?php bloginfo('template_url'); ?>/images/header_1.jpg" alt="<?php bloginfo('name'); ?> header image 1" title="<?php bloginfo('name'); ?> header image 1" /> <?php } else { ?> <img src="<?php bloginfo('template_url'); ?>/images/header_2.jpg" alt="<?php bloginfo('name'); ?> header image 2" title="<?php bloginfo('name'); ?> header image 2" />
To be honest, I’m quite rookie at PHP, so if I could get your help for 2 seconds to identify what I need to replace with what, I’d be more than grateful.
Header I want to use instead url: https://personligutvecklingnu.se/wp-content/uploads/2015/12/Pink-header.png
Page ID: 1450Thank you seven million times.
PS. Where in my custom page template should I then insert this code? Top? Bottom? <3
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom header for certain page – PHP help’ is closed to new replies.