Taxonomy Rewrite Rules Redirecting Instead of Masking
Found the solution. The rewrites were getting added to the db after the system was reading them from the db. Moved the code and it worked!
Found the solution. The rewrites were getting added to the db after the system was reading them from the db. Moved the code and it worked!
To at least answer the title of your question, the pre_get_posts filter may be useful. From the Codex: This hook is called after the query variable object is created, but before the actual query is run. The pre_get_posts action gives developers access to the $query object by reference (any changes you make to $query are … Read more
OK, I’ve found it by testing all of the combinations, I could imagine: RewriteCond %{HTTP_HOST} ^(.*)domain\.com RewriteRule ^wp-content/uploads/(.*)$ wp-content/blogs\.dir/3/files/$1 [L]
My gut feeling is that you want to use custom taxonomies for part of this. So client-name would be one taxonomy (flat), version would be another taxonomy (also flat). Wireframes might a post type or a taxonomy, not sure what makes sense for you. A little googling led me to the following links, that you … Read more
You may have to flush the permalink structure. You can either visit the settings->permalinks page or use flush_rewrite_rules() method.
How to change “attachment_id” in attachment permarlink?
Just use a translated slug: // Use a translated slug in pretty permalinks ‘rewrite’ => array ( ‘slug’ => _x( ‘default-slug’, ‘slug’, ‘your_text_domain’ ), ‘with_front’ => FALSE ), In your translation you can change the slug now like everything else.
I used this to enable yearly and monthly archive for custom post type. Just drop in this code into your functions.php file. This will add your custom rule right on the top of the Rules array. NB – WordPress uses rules array to store rewrite rules. <?php function wpse22992_custom_post_rewrite( $rewrite_rules ) { $cpslug = ‘contest_recipe’; … Read more
Getting 404 error on my wp rewrite error
So I’ve solved this problem, but I’m still scratching my head about the “solution”: add_rewrite_rule(‘api/autho/?$’,’index.php?__api=1′,’top’); This version of the rewrite rule works for some reason. I’m guessing that there’s some sort of namespace conflict that I accidentally stumbled across. Maybe /auth/ is used somewhere else?