Support » Plugins » Bulk Generating add_rewrite_rule

  • Hi. I won’t go into the ins and outs of why I’m doing this but, because I’m not able to rely on regular expressions to capture the requested URL, I’m generating 1,500+ rewrite rules based on combinations of terms from within several taxonomies.

    Currently I’m adding these with the add_rewrite_rule function via the init action. Is this the best way to do it?

    I’m worried about the number of queries needed to generate the rewrites and the overheads, and that init is called every time the page loads.

    Any suggestions? Many thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter scarekrow76

    (@scarekrow76)

    After sleeping on it, I’m leaning in the direction of creating a simple settings page with a submit/refresh button to flush and regenerate the rules as required. They should rarely change.

Viewing 1 replies (of 1 total)
  • The topic ‘Bulk Generating add_rewrite_rule’ is closed to new replies.