Support » Plugin: The Future Is Now » [Plugin: The Future Is Now] Works for posts, but not for custom post types

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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);
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: The Future Is Now] Works for posts, but not for custom post types’ is closed to new replies.