Help adding custom url, rewrite_rules_array
For anyone looking, the solution was: add_action(‘init’, function() { add_rewrite_rule( ‘product/(.*)/(.*)/?’, ‘index.php?product=$matches[1]&view=$matches[2]’, ‘top’ ); });
For anyone looking, the solution was: add_action(‘init’, function() { add_rewrite_rule( ‘product/(.*)/(.*)/?’, ‘index.php?product=$matches[1]&view=$matches[2]’, ‘top’ ); });
You can use a rewrite endpoint for this. The first step is to give your custom taxonomy an endpoint mask when you register the taxonomy: $args = [ ‘rewrite’ => [ ‘slug’ => ‘topic’, ‘ep_mask’ => EP_CATEGORIES ], // the rest of your args… ]; register_taxonomy( ‘topic’, array( ‘post’ ), $args ); The next step … Read more
Prefix only some posts with a custom prefix
Rewrite url for custom post type with specific url
It’s the redirect in htaccess that will route the “pretty” url into the real querystring based url that is the issue. So, it would seem you need to “remove” the /{nicename} portion from the “pretty” URL of the form https://example.com/members-list-profile/{nicename}/?uid=XX. Try something like the following at the top of your .htaccess file (before the WordPress … Read more
Issue with custom rewrite for products and permalinks
Rewrite rule not working, suspect redirect string
Your taxonomy is set to ‘hierarchical’ => true, do you have the post included in both the parent and child category? If you untick the parent category and only tick sub-category then it should use the first URL only.
add_rewrite_rule() returns 404 page
As answer provided by @tmdesigned in comments above. An extra step is needed, to go to settings and resave permalinks.