Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author NextScripts

    (@nextscripts)

    it maybe hidden or dynamic CPT. Are you sure you need such CPT autoposted?

    Thread Starter zingerion

    (@zingerion)

    Yeah, the CPT allows me to add and edit the tweets from the dashboard without them showing up as regular posts anywhere. I can’t think of any other way to do that. The CPT configs are:

    'description' => __('Tweets to be shown in Resources section.'),
    'public' => false,
    'show_ui' => true,
    'publicly_queryable' => false,
    'exclude_from_search' => true,
    'menu_position' => 25.25,
    'supports' => array('title', 'author', 'editor', 'thumbnail'),
    'can_export' => true,
    'hierarchichal' => false,
    'taxonomies' => array('category'),
    'capability_type' => 'post'

    Can you see anything I need to change/add so that your plugin admin settings will be able to display the CPT, and will autopost / auto repost the tweets successfully? Of course, without creating public WP posts?

    Thanks so much for your help.

    Plugin Author NextScripts

    (@nextscripts)

    May be switching ‘publicly_queryable’ => false, to “true” will help?

    Thread Starter zingerion

    (@zingerion)

    Nope, no effect. Your plugin sees the publish, but cannot list the CPT in the settings. Perhaps there is a simple hack of your plugin to allow the inclusion of the CPT? Can you point me in the right direction?

    Y:[2014-02-14 14:46:07] - [Skipped]- Excluded Post Type: tweets (Post ID: 805)
    [2014-02-14 14:46:07] - [*** ID: 805, Type: tweets]- Status Changed: draft_to_publish. Autopost requested.

    Thanks!

    Plugin Author NextScripts

    (@nextscripts)

    Here is the code that we use to get a list of available CPTs. It’s very simple.

    $args = array('public'=>true, '_builtin'=>false);
    $output = 'names';
    $operator = 'and';
    $post_types = get_post_types($args, $output, $operator);
    Thread Starter zingerion

    (@zingerion)

    Yes, this is what I found as well. I changed all 4 occurrences of ‘public’=>true to ‘show_ui’=>true.

    Also, because there is no URL (because the post is private) I had to hack the URL generating system so that I could manually place a static URL entirely in the “Additional URL Parameters” box, which is then shortened.

    So far it looks like the mods are working…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Cannot Autopost to Custom Post Types’ is closed to new replies.