2 votes
Accepted

Is there a way to create a single rewrite rule to handle multiple variables depending on what is present?

I was able to make this work by using a power set function and then using that array to create individual rewrite rules. add_action('init', 'ebd_custom_rewrite_rules'); function ...
Tommizzy's user avatar
1 vote

Is there a way to create a single rewrite rule to handle multiple variables depending on what is present?

No but not because of WP rules, it's because you'd need to write a single regular expression that matched any URL that met your parameters, and map it into a singular URL. While you could figure out a ...
Tom J Nowell's user avatar
  • 59.2k
1 vote

Custom pages with plugin

A lot simpler solution is automagically adding the page if it does not exist. We can use a custom meta key to check its existence. We can do callback in the the_content filter if the current id is the ...
inf3rno's user avatar
  • 133

Only top scored, non community-wiki answers of a minimum length are eligible