• Sorry for the newb question but I’m new to WP. I’m building a five-page site (not a blog) and would like a different image at the top of each of the five pages. Is this possible? Is it theme-sensitive (does it depend on the theme as to whether you can or not)? If it’s possible, what’s the procedure? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Is it theme-sensitive (does it depend on the theme as to whether you can or not)?

    It’s theme dependent. Some themes can, some can’t. Twenty Ten can, by specifying a featured image for a post (or page).

    It can be done pretty simply in php. You need to create an if statement, but it will depend on how it is displayed in your theme. If you have a header.php file you could probably alter it there, or you might need to add a filter in your functions.php file.

    If you can find where your current header image is displayed in your theme files, it would look something like this (ish):

    if (is_page('home')){
    ?>
    	<img src="/imagepath/">
    <?php } elseif (is_page('page2')) { ?>
    	<img src="/imagepath/">
    <?php } elseif (is_page('page3')) { ?>
    	<img src="/imagepath/">
    <?php } elseif (is_page('page4')) { ?>
    	<img src="/imagepath/">
    <?php } else { // -- default header -- //
    ?>
    	<img src="/imagepath/">
    <?php }

    Hope that helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can I have different graphics at the top of different pages?’ is closed to new replies.