Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Test if my rewrite is still set

$
0
0

Replies: 0

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 all articles
Browse latest Browse all 59525

Trending Articles