How to correctly call flush_rewrite_rules() ?
-
Hi,
I have several custom post types in my site and I added the
flush_rewrite_rules()
inside the last register post type function in myfunction.php
theme file.This works and stops 404 pages, but after a while the rewrite_rules in wp_options started to act up and it periodically appear in my mysql_slow_queries log file.
I’ve tried to search about this but find varying answers, lots of which I don’t know how to apply. I haven’t been able to understand the explanation in register post type codex on how to use it on
register_activation_hook
too.Can anyone please give me some help on how to correctly call flush_rewrite_rules()?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to correctly call flush_rewrite_rules() ?’ is closed to new replies.