Plugin Rewrite Help
-
I’m convinced I can do this, but I’m just blanking on it. Please help my feeble brain ??
I am writing a plugin that needs to handle a specific rewrite scenario. I want to have my plugin code handle all requests that take the form: https://example.com/xyz and children (https://example.com/xyz/whatever…). I’m OK with the later being turned into some query var (e.g. ?xyzpage=whatever) and handle that later on.
I cannot solve it with adding template pages because I don’t know what the theme is, and want the user to be able to choose their own theme. I can’t just hack .htaccess and pound in rewrite rules there, because it would take it out of WP as I want it to be part of the WP system (I need get_header and friends, as well as most of WP anyway).
I’m sure the answer is somewhere in the wp_rewrite world, is it simply adding a rewrite rule at the front? How do I then get my plugin in charge and skip index.php?
Thanks for your help,
Chris
- The topic ‘Plugin Rewrite Help’ is closed to new replies.