Adding Theme File for Non-WordPress Content

Just remove pagename=event& and reset your rewrite rules… $newRule = array(‘event/(.+)’ => ‘index.php?eventid=’.$wp_rewrite->preg_index(1)); *template_include* is a filter NOT an action! add_filter(‘template_include’, array($EventpageCode, ‘template_redirect_intercept’)); You can use *wp_title* function or filter to modify your page title.

rewrite rules and capturing

You could add a rewrite rule. Rewrite rules are the regular expressions that WP uses to parse out the query from friendly URLs. But I think this would potentially mess things up. How would WP distinguish between /this-is-a-page/this-is-a-child-page/ and /this-is-a-page/this-is-a-parameter/? A better option, I think, would be to hook into the parse_request action. This gets … Read more

Custom rewrite rule takes place AFTER the generic category rule

The answer I’ve come up with on my own I know is a really bad idea. But it works and I have to have a working solution. (Doesn’t mean I can’t fix the problem later…) add_filter(‘rewrite_rules_array’, ‘terminate_with_prejudice’); function terminate_with_prejudice($rules) { // if we don’t remove this we’ll never see our custom rule. unset($rules[‘(.+?)/?$’]); $rules = … Read more