WP Rewrite Rule Issue while using Custom post type & taxonomy

Don’t really know why but here is a working solution : $blogCategoryBaseSlug = ‘articles’; $labels = array( ‘name’ => __( ‘Blog Post’, ‘Post Type General Name’, $this->text_domain ), ‘singular_name’ => __( ‘Blog Post’, ‘Post Type Singular Name’, $this->text_domain ), ‘menu_name’ => __( ‘Blog Posts’, $this->text_domain ), ‘name_admin_bar’ => __( ‘Blog Post’, $this->text_domain ), ‘archives’ => … Read more

Set a CPT slug as a base name for all the taxonomies

I think if you change the rewrite in your register_taxonomy $args ‘rewrite’ => array( ‘slug’ => ‘photographies/couleurs’,’with_front’ => false ), This will probably clash with rewriting the custom post type so you’ll more than likely get a 404 on this url: http://thewebsite/photographies/ but if you don’t need that url then this solution will help you … Read more

URL rewriting not working

Just use this rewrite rule in your htaccess file, it will strip all query strings. RewriteRule ^(.*) /$1? [R=301,L] to allow more rules to follow use this instead RewriteRule ^(.*) /$1? [R=301] remove 301 like this RewriteRule ^(.*) /$1? [NE,L] and refer the correct url for search engines. without 301 you will need to make … Read more

Force search form to go to clean url without multiple redirects

Assuming you make your form’s action point to the correct URL, here are Two (and a half) Options: With Javascript (jQuery) jQuery(document).ready( function() { jQuery(“#searchform”).submit( function() { self.location.href = jQuery(this).attr(“action”) + jQuery(“#s”).val(); return false; }); }); You could also do it without jQuery (if you don’t use jQuery on your site and don’t want to … Read more