• jhashey

    (@jhashey)


    Hello,

    I would like to change the header image / banner on ONE page of my wordpress site. Can anyone please tell me how to do that? Thanks!

    Joe

Viewing 4 replies - 1 through 4 (of 4 total)
  • Samuel B

    (@samboll)

    Micah Cooksey

    (@micahcooksey)

    No fair, Samboll, you beat me to it! lol.

    You could also use:

    <?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″ />

    and replace “pagename” at the beginning with the page id that you want to be different as well as the filenames.

    Thread Starter jhashey

    (@jhashey)

    Ah, Thanks!

    That would help get things started.

    I want to copy my current template then add a new header. Do I have to do that in the ftp? I cant seem to find anywhere in the “appearance” tab?

    Thanks.

    Joe

    Micah Cooksey

    (@micahcooksey)

    You could use the built in editor at Appearance >> Editor or use a text editor with ftp. The code above doesn’t require a custom page template, because you could just add it into your header.php. If you want to create a custom page template, remove the <?php get_header(); ?> from your copied page.php and then copy-and-paste the contents of your header.php instead. Then you can add the code for the header. Ether way would work fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change header image on ONE page?’ is closed to new replies.