Test if my rewrite is still set
-
I have written a plugin for our website, this plugin sets a custom rewrite on activation as it pulls data from an external source, saves to the database in a custom table and displayed using a /item/ (page-item.php) template in the form of website.com/item/itemid/.
The site has many other plugins installed and one of these keeps flushing the rewrites (my guess is that it is Yoast SEO) making all of the /item/itemid/ pages break.
Is there a way to check whether a rewrite is active? I’m thinking that if there is, I could write a scheduled task to run every 5 minutes, check if the rewrite is active, if not, set it again.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Test if my rewrite is still set’ is closed to new replies.