Support » Plugin: Display Posts Shortcode » [Plugin: Display Posts Shortcode] list of category posts made with custom post type?

  • Resolved 50slespaul

    (@50slespaul)


    Trying to display a list of posts in a category but the posts are made with a custom post type ( Custom Post Type UI ) but will not display! using:

    [display-posts category=”mystuff” posts_per_page=”-1″]

    If I change the category= to any category that has posts made via “posts” they display… but will not display any posts made via custom post type… anyone have an idea?

    http://wordpress.org/extend/plugins/display-posts-shortcode/

Viewing 3 replies - 1 through 3 (of 3 total)
  • [display-posts category="mystuff" posts_per_page="-1" post_type="myposttype"]
    should do the trick

    if you need to include both normal posts and posts from a custom post type in your listing, you will need to change line 68 of the plugin file to

    'post_type' => explode(',',$post_type),

    and then use this shortcode:
    [display-posts category="mystuff" posts_per_page="-1" post_type="post,myposttype"]

    Many thanks for your help!!

    Plugin Author Bill Erickson

    (@billerickson)

    Just as a note, I just released a new version of Display Posts Shortcode which supports multiple post types. You don’t need to edit the plugin for this functionality as mentioned above.

    [display-posts post_type=”page, post”]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Display Posts Shortcode] list of category posts made with custom post type?’ is closed to new replies.