Does anyone have any ideas on how to get similar functionality for custom post types?
Does anyone have any ideas on how to get similar functionality for custom post types?
The plugin will only work with posts and not CPT's thats because they hook into future_posts and not future_{CPT_NAME}
If you know some coding this may help you with getting this to work with CPT's:
remove_action("future_{$post_type}", '_future_post_hook');
add_action("future_{$post_type}", 'publish_future_events_now', 2, 10);
function publish_future_events_now($depreciated, $post) {
wp_publish_post($post);
}Thanks!
Hi any chance this can work for Pages? I tried some super amateur PHP copy/replacing, adding the code below but it didn't work. Thanks!! Great plugin.
function setup_future_hook_page() {
// Replace native future_page function with replacement
remove_action('future_page', '_future_page_hook');
add_action('future_page', 'publish_future_page_now');
}
function publish_future_page_now($id) {
// Set new page's post_status to "publish" rather than "future."
wp_publish_page($id);
}
You must log in to post.