How do I know which archive page I'm on? (5 posts)

  1. Mark (podz)
    Support Maven
    Posted 12 years ago #

    This hack - http://wiki.wordpress.org/MtDewVirus%20Archives - used mod_rewrite so it may be you need to use that too.
    That's a hack from way back when though, so don't trust the code with 1.2 mingus - it *might* not work.
    It's good for ideas and the rewrite rules though.

  2. carthik
    Posted 12 years ago #

    rubyji, this is forthcoming in 1.3 In the CVS there are some more "parameters" like $single. Hope that is reassuring :)

  3. bstovold
    Posted 12 years ago #

    Rubyji, if you don't wanna wait for 1.3, I managed to find a reasonably simple solution. Check out this post if you're interested.

  4. Ruby Sinreich
    Posted 12 years ago #

    That looks quite helpful, thanks. How long will I have to wait for WP 1.3? If it's really soon, I can hang on...

  5. Ryan Boren
    WordPress Dev
    Posted 12 years ago #

    To elaborate on what is in CVS, we have the WP Query State Class which will parse a query string and tell you if the query is for a single page, an author page, a category page, etc. The convenience functions is_single(), is_author(), is_category(), etc. live in functions.php.
    The logic used in WP Query State can also be used in 1.2.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.