Viewing 5 replies - 1 through 5 (of 5 total)
  • brittanie

    (@brittanie)

    I don’t know how your permalinks are set up, but most WordPress permalinks use a sort of staggared url for archives that includes the month and year of the archive. For example, one site might use an archive url like this: ‘http://www.blah blah.com/blogs/?m=200509’ where 200509 indicates it’s the archive for Sept. 05. On my site, my monthly archives look like this: http://rulebrittaniea.org/2006/04/14/taxi-driver/. You can remove the name of the post and get the archives for 4-14-06. You can delete the 14 and get the archives for for all of April 2006 and finally you can remove the 4 and get all the archives for 2006.

    You’ll have to figure out how your permalinks are set up, and if you want to change their structure to make them easier to track.

    This assumes, of course, that you are tracking referrers by using urls.

    Kafkaesqui

    (@kafkaesqui)

    Along with ‘m‘ as brittanie points out, WordPress can also pass ‘year‘, ‘monthnum‘ and ‘day‘ query vars, and does for the custom permalink structure brittanie demostrates above.

    Thread Starter egarcia

    (@egarcia)

    I think I understand but I’m not sure that’s what I was looking for.

    After looking at my htaccess for the umpteenth time, I think I’ve figured out what I need. I need to be able to use whatever data is passed by %{REQUEST_FILENAME} to WP. I tried using $_REQUEST[] but that’s always empty, so are $_GET and $_POST. How does PHP get the data from %{REQUEST_FILENAME}?

    Kafkaesqui

    (@kafkaesqui)

    How does PHP get the data from %{REQUEST_FILENAME}?

    Do you mean $_SERVER['REQUEST_URI'] ?

    $_GET should only be empty when on the home page of a WordPress blog. At all other times it’s definitely passing various query vars that are available through $_GET.

    Thread Starter egarcia

    (@egarcia)

    Odd… REQUEST_URI wasn’t working on my local machine…

    But ya, that did it 🙂 Thanks a lot, Kafkaesqui!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to determine which archive I’m on?’ is closed to new replies.