Support » Fixing WordPress » page ‘blog’ doesn’t work right

  • I have the following code in my page.php file. As you can see, it appears the pages all properly show the correct header graphic for each page. However, the BLOG page does not do this correctly. WHY?? I can’t figure this out.

    Site here >> sanddlife.com (the URL is only temp)

    Thanks!

    `<?php if (is_page(‘home’)) {
    $hdrimg = ‘header-home.jpg’;
    } elseif (is_page(‘blog’)) {
    $hdrimg = ‘header-blog.jpg’;
    } elseif (is_page(‘photos’)) {
    $hdrimg = ‘header-photos.jpg’;
    } ?>

    <div id=”pagetitle”>
    <img src=”<?php bloginfo(‘url’);?>/images/<?php echo $hdrimg;?>”/>
    <?php $url = get_stylesheet_directory_uri()?>’

Viewing 1 replies (of 1 total)
  • The code elseif (is_home() which should tell you that you’re on the ‘blog’ page doesn’t seem to be working either.

    I’d like to add a graphic header to the top of the ‘blog’ page but can’t tell how to detect that page or link…it’s just not cooperating!!

Viewing 1 replies (of 1 total)
  • The topic ‘page ‘blog’ doesn’t work right’ is closed to new replies.