View Full Version : Adding an sql query to a wordpress permalink?

12-23-2011, 11:28 AM
Ok....so I created a new wordpress theme and I still can't get my custom code to work.

I want to be able to have a list of items, each item will have this URL format:


The ?id=XX query should be at the end of the URL and will direct the user from the category page to the subcategory page showing specific data about the item with the XX id.

This page (http://stackoverflow.com/questions/3256888/how-to-include-a-custom-string-in-a-wordpress-permalink) shows something about it but I'm still confused.

Each item in the list is wrapped in an <a href> tag in the category template page and the subcategory page uses $_GET. I've got one wordpress theme that works but on my other site, I use a different theme and it doesn't work. If a user clicks on an item in the list, the user gets directed to the subcategory page without the sql string attached. I'm not sure what to put in the functions.php file in wordpress (or whatever the file is called that handles functions) or in the htaccess. Any help is appreciated.

12-26-2011, 07:11 AM
*bump* anyone?