New answers tagged

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
0 votes

What is the `rewrite_rules` option the options table in the WordPress database?

In WP Platform , the rewrite_rules option in the database perform important role in handling permalink structures and generating rewrite rules for WP URLs rewrite_rules option stores an array of ...
vijay pancholi's user avatar

Top 50 recent answers are included