URL rewrite before template_redirect called

So the problem was redirect_guess_404_permalink was detecting a 404 error and ‘guessed’ /members/blog to be /blog My hacky solution was to hook into the status error check (Stop WordPress from “guessing” redirects for nonexistent URLs) and if URL parts match then unset the guessed solution function blog_no_redirect_guess_404_permalink( $header ){ global $wp_query; if( is_404() ) { … Read more

Url wordpress rewrite

You don’t need to create a folder. And create a file inside your theme with starting content of following one <?php /* Template Name: Mail Page */ // here your mail page content. ?> Now goto backend and pages-> Add New. Title your page and select a Template Mail Page. Now you can write your … Read more

variable endpoints for webservice

Ok, so it might have been working all along, and I just hadn’t flushed the rewrites! function my_dept_listing_init() { //Easy flush if (isset($_GET[‘flush’])) { flush_rewrite_rules(); } //endpoint onto which queries are made add_rewrite_endpoint( ‘individuals’, EP_PAGES ); //This filter acts as a controller, inject into content add_filter(‘the_content’, ‘my_dept_listing_content_ctrl’); } add_action(‘init’, ‘my_dept_listing_init’); function my_dept_listing_content_ctrl($content) { global $post; … Read more