Rewrite rule for custom taxonomy
I came up with this with the add_rewrite_rule(): add_rewrite_rule(‘^recipes-with-([^/]*)/?’,’index.php?ingredient=$matches[1]’,’top’); I did some testing for the above, and it works well when you use it for one taxonomy at time. Here is the code from my functions.php: add_action( ‘init’, ‘create_ingredient_tax’ ); function create_ingredient_tax() { register_taxonomy( ‘ingredient’, ‘post’, array( ‘label’ => ‘Ingredient’, ‘hierarchical’ => true ), array( … Read more