NextScripts: Social Networks Auto-Poster
[resolved] Cannot Autopost to Custom Post Types (7 posts)

  1. zingerion
    Posted 2 years ago #

    Log says: [Skipped]- Excluded Post Type: tweets

    The settings shows only a blank box for the Custom Post Types list. Perhaps the CPT needs a special feature enabled to be included here?


  2. NextScripts
    Plugin Author

    Posted 2 years ago #

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

  3. zingerion
    Posted 2 years ago #

    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.

  4. NextScripts
    Plugin Author

    Posted 2 years ago #

    May be switching 'publicly_queryable' => false, to "true" will help?

  5. zingerion
    Posted 2 years ago #

    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.


  6. NextScripts
    Plugin Author

    Posted 2 years ago #

    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);
  7. zingerion
    Posted 2 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextScripts: Social Networks Auto-Poster
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.