• Brian

    (@wgbcworship)


    I’m using the following code to set my page title. I’m using a static front page and have set my posts page accordingly. is_home() should work on the posts page (annamayer.com/news), however, it doesn’t.

    Any ideas on what to change to correct this?

    <title>
    <?php bloginfo('name');
     if ( is_404() ) : _e(' &raquo; ', 'ProPhoto'); _e('Not Found', 'ProPhoto');
     elseif ( is_front_page() ) : _e(' &raquo; ', 'ProPhoto'); bloginfo('description');
     elseif ( is_home() ) : _e(' &raquo; ', 'ProPhoto'); bloginfo('description');
     else : wp_title(); endif; ?>
            </title>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Brian

    (@wgbcworship)

    Also, this page does not show up in my stats using wordpress.com stats plugin

    Thread Starter Brian

    (@wgbcworship)

    anybody? is this really that perplexing?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    It’s perplexing because nobody really understands what your question is.

    Try to be more clear. What are you expecting to see? What do you actually see?

    Thread Starter Brian

    (@wgbcworship)

    when I use is_home() in the context above it should return the description field after the blog title in the title bar. On the Front Page (static) it behaves as expected. On the posts page, it doesn’t. It just shows the blog title. The code is the same other than the is_home() replacing is_front_page.

    What about this code is incorrect for displaying the blog title and blog description on the posts page?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Hmmm.. I can’t explain that. is_home returns true for the main blog posts page, that is correct. And I can verify that it works on my own site. So, something else has got to be affecting it somehow.

    Have you tried using <?php wp_reset_query(); ?> ?

    Thread Starter Brian

    (@wgbcworship)

    I figured it out. I’m using the All in One SEO plugin with Rewrite titles enabled. The field for the “Home” title was blank. Once I got that filled in, it was fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘is_home () not working for posts page’ is closed to new replies.