• I want to show some code on my sidebar on all pages except for the home/front page. This is working except for when I browse to next pages like page 2, page 3, etc. is_home() is still returning true even though I am on page 2!

    How can I get is_home() to return false on page2 and show content on this page (and other paged pages only?)

    I have searched and found some posts that make me think this is harder than it should be.

    My home page is a regular blog.
    I am using WordPress 2.7.1

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi

    The resolution was in the comments to that Trac page you linked to. I tested it and it works, returning true on the 1st page and false on the 2nd.

    if (is_home() && !is_paged()) Once it reaches page 2, is_paged() is true, thus the expression returns false since its testing for “not is_paged()”

    that double & a m p ; is supposed to be && – the forum software changes the code

    Thread Starter bh

    (@bh)

    Thanks Stvwlf – I did tried all the examples, and also gave your code another shot but nothing worked for me.

    If it makes a difference I am calling this from sidebar.php.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show on all pages except for home/front page’ is closed to new replies.