Individual URL style for a page
Is it possible to configure the url style for one individual page instead of making the configuration site wide?
I built my plugin to work with the ?page=7 style.
Which is easier or is it even possible to have users set the page url format for this page like that or do I need to rework my code to accomodate all the other styles?
Thanks
Chris Scott 3:25 pm on February 18, 2010 Permalink
You shouldn’t rely on the permalink structure since, as you noted, the user can change it. Just grab $post->ID instead.
BungeeBones 9:01 am on February 20, 2010 Permalink
Thanks, Chris,
I took so long getting back because I wanted to research a little better and get a better understanding of the problem.
The issue relates to the fact this plugin uses a sort of “remote access call” to my server to get info from it for display in the plugin.
I used a different than normal url pattern that is meant to be more search engine friendly. This system works fine in conventional “php land” but it seems WordPress is doing something to the urls at the mod-rewrite level. I have done very little in the area of mod-rewrite but I am getting a crash course. Until I get this figured out the plugin only works using the default permalink system.
The logic I need to implement would be to say this at the mod rewrite level:
Ahh, look Apache, when you get a request forthis page -> [insert page name where pluggin's shorcode is] then DON’T rewrite this url according to the user’s preferences but rather just use the default rewrite routine (or maybe even just leave the url intact as is and deliver to that page).
I’m not sure how I could deliver the [insert page name where pluggin's shorcode is] variable to the pluggin. Can WP rewrite the htaccess code as part of a plugin install or activation?