Support » Plugin: Live Blogging » List custom post types?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Now that I’ve created a version, I’m playing around with it, and will try to add this functionality. It seems good to have for those who use post types. No promises, my coding skills are limited to copying and adapting code, but I’m somewhat good at that :p

    I sort of hacked the code around to reveal the “live blog entry” CPT to the rest of WordPress. So I can kind of make Pressgram work with it. But the problem is that entries created outside the post editor aren’t assigned to a live blog.

    I didn’t quite understand. Is it possible to share the code, so I can run it and see what it does? Or perhaps give an example?

    I figured it out. While Pressgram (or theoretically any other CPT-creating plugin) can add to a custom post type, I first had to make “live blog entry” visible to other plugins, allowing it to have categories, and also enabling the featured image (thumbnail) for future potential.

    This meant changing line 69 to:

    'public' => true,
    'supports' => array('editor', 'author', 'thumbnail'),
     'taxonomies' => array('liveblog', 'category'),

    Then, in Pressgram (or other CPT-based plugin), I had to tell it to automatically assign a liveblog to the posts it adds to my CPT. So I found where that plugin creates the posts and added a line like this:

    wp_set_post_terms( $post['ID'], '####', 'liveblog');

    Where “####” is the ID number of the liveblog page.

    It’s a hacked together way, but it works for now.

    This is good. I will add it to the plugin’s documentation, in case anyone else needs to do it.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘List custom post types?’ is closed to new replies.