• Hey!
    I have a problem.
    I wanted to make different sidebar on Archive pages, but I had a problem, and couldn’t find solution.
    Function is_archive() returns True on my main page, and I’m using home.php template file for main page.

    I tried to compare HTTP headers with bloginfo(‘url’), but it also didn’t worked. Maybe took wrong HTTP headers, but anyway – please help me.
    What would be the solution for this problem?

    PS. Talking about home.php template, Admin bar shows Edit Category, not Edit Page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • are you using a custom query in home.php?

    if so, try to close that properly, for instance with wp_reset_query()

    I’m pretty sure that what you’re observing is the expected behavior.

    The is_archive() conditional returns true when on an archive index. The Blog Posts Index is a form of archive index – it is simply returning all posts.

    What are you trying to accomplish with an is_archive() conditional in this context? There’s probably another way, if we know what you’re trying to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_archive() on home.php’ is closed to new replies.