using Custom $_GET variables with Templates and Permalinks
I’m currently working on a new site that will utilize WP as a content management system as much as a blog.
on major feature of the site is an extensive catalog of items for which there are hundreds. I’ve created a completely custom database to store data about these items.
In any case I created a page template that goes into my tables and fetches some data and does some things with it on the screen.
What I need to do is get 2 $_GET vars from the url so that my script can use it in the query to return more narrow results.
The vars are “e” and “p”
the script works beautifully external to WP but as soon as I try to use it within WP it cannot get the vars, likely do to misinterpretation with the permalink structure.
I have a page called “game-db” so the permalink looks like http://mysite.com/game-db
Ideally I’d like my get vars to incorporate something like http://mysite.com/game-db/p-val/e-val
but even when I do
it does not work
I couldn’t find any information on working with $_get vars and permalinks… any info would be quite helpful, I’m horrible with regex and modrewrites and the way WP does them is even more foreign to me… but I am quite handy with php.
- The topic ‘using Custom $_GET variables with Templates and Permalinks’ is closed to new replies.