WordPress.org

Ready to get started?Download WordPress

Forums

page 'blog' doesn't work right (2 posts)

  1. sanddlife
    Member
    Posted 4 years ago #

    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()?>'

  2. sanddlife
    Member
    Posted 4 years ago #

    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!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.