Custom meta box values are not getting saved for my custom post type

but remaining values (checkbox, select, images) are not getting saved I believe those fields are also getting saved, but you are just not displaying them correctly. And you should always escape input/textarea values, e.g. use esc_attr() for single-line inputs and esc_textarea() for textareas (multi-line inputs). So to make your code work correctly, try these: First … Read more

Plugins and caching

Well this is the whole point of cache plugins. Caching plugins let the page load normally, with all plugins, and then saves the result as a static HTML page. Future requests for a specified period of time, or until the cache is emptied, will be sent directly to that HTML file. This allows the page … Read more

Will I get an error if I try unscheduling a WP Cron scheduled task that wasn’t scheduled?

So yeah, it does give errors for trying to unschedule something that isn’t scheduled, but the answer is pretty easy and simple: $timestamp = wp_next_scheduled( ‘scheduled_hook’ ); if ($timestamp) wp_unschedule_event( $timestamp, ‘scheduled_hook’ ); Since wp_next_scheduled will return false for unscheduled hooks, a simple if in front of the call to wp_unschedule_event will prevent it from … Read more