I\'m trying to create a rewrite rule in Wordpress to create direct pretty links to search results.
I\'m working with a custom post type called \'object\'
My resu
Use this plugin Rewrite plugin it will help you to analysize which rule is working when you hit the url..you can create new rewrite rule and can check here itself whether they are working accordingly or not.
There is no need to write anything in wordpress because wordpress itself has a wp_rewrite class which manages all the rewrite rules.
Try with several rewrite rules and set the rule priority accordingly. because the rule mentioned or listed above in the list will match first if a match found above then wordpress will ignore the below listed rules.
I have used this plugin and its work for me the way i want. Attaching the screenshot here