how to create cron that post events daily in wordpress?
WordPress has a cron API and if you want to use it you can do it with wp_schedule_event function. This function should be called only on ativiation of the plugin and the scheduled event should be cleared on deactivation of the plugin. For example: register_activation_hook( __FILE__, ‘cyb_activation’ ); function cyb_activation() { wp_schedule_event( time(), ‘daily’, ‘cyb_daily_event_hook’ … Read more