WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] list of category posts made with custom post type? (4 posts)

  1. 50slespaul
    Member
    Posted 2 years ago #

    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/

  2. QRohlf
    Member
    Posted 2 years ago #

    [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"]

  3. 50slespaul
    Member
    Posted 2 years ago #

    Many thanks for your help!!

  4. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    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"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.