Custom Querystring on WordPress Permalink Page

i’m having a really difficult time getting this to work…

Basically – I have a url

Read More
http://www.mysite.com/calendar-of-events

i’m trying to make it so i can pass the month and year via querystrings like

http://www.mysite.com/calendar-of-events?m=10&y=2012

however – anytime i do that i’m getting a 404 page not found in wordpress

Im not sure how I can configure the rewriting to allow a url like that AND allow me to access those querystring values

I really appreciate your guidance on this!!

Loren

Related posts

Leave a Reply

2 comments

  1. You are using ‘m’ in the query string. Hovever, ‘m’ is a reserved WordPress Query Variable as you can see here:
    wp codex

    I am not sure what ‘m’ is used for, but using it in the query string like you are doing will add something to the where clause in $wp_query->request. The result is probably not what you are expecting.

    edit:
    also you should add a ‘/’ before the start of the query string, like this:

    http://www.mysite.com/calendar-of-events/?m=10&y=2012