WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Mark (podz)
    Support Maven
    Posted 10 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
    Member
    Posted 10 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
    Member
    Posted 10 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.
    Cheers,
    Ben.

  4. Ruby Sinreich
    Member
    Posted 10 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 10 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

Tags

No tags yet.