WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. zingerion
    Member
    Posted 6 months 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?

    https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/

  2. NextScripts
    Member
    Plugin Author

    Posted 6 months ago #

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

  3. zingerion
    Member
    Posted 6 months 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
    Member
    Plugin Author

    Posted 6 months ago #

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

  5. zingerion
    Member
    Posted 6 months 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.

    Thanks!

  6. NextScripts
    Member
    Plugin Author

    Posted 6 months 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
    Member
    Posted 6 months 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...

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.