开发者

Automatically load Wordpress page on server every XX hours

开发者 https://www.devze.com 2023-04-10 16:43 出处:网络
I have a page in my Wordpress site that calculates 开发者_高级运维post popularity and updates several meta fields on the posts and calls a few functions as well.This page is set to \"Private\" so that

I have a page in my Wordpress site that calculates 开发者_高级运维post popularity and updates several meta fields on the posts and calls a few functions as well. This page is set to "Private" so that only myself and other admins can see it. Is there a way to load this page automatically every 6, 12, or 24 hours?

I'd be satisfied with a plugin, but generally prefer to write my own PHP code.


Create a cron job or use WordPress directly with wp_schedule_event(). The latter would probably allow you to remove the placeholder page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号