WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Return specific posts (9 posts)

  1. uisneach
    Member
    Posted 2 years ago #

    Is it possible to pass a list of post ids to the shortcode? Say if you had 10 posts in a custom post type but you only want to display just 3 of the posts?

    Thanks!

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

  2. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    Not at this moment, but the next version of this plugin will include a filter that lets you do this.

  3. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    As a followup, you can now use a comma separated list of IDs in the shortcode. So to list 3 specific posts in the 'event' post type, use this:

    [display-posts post_type="event" id="4,18,24"]

  4. BMag
    Member
    Posted 1 year ago #

    Hi Bill,

    How would I exclude a specific post or posts?

    Thank you!

  5. BMag
    Member
    Posted 1 year ago #

    I tried [display-posts category="interviews" posts_per_page="-1" include_date="true" order="ASC" orderby="title" image_size="thumbnail" include_excerpt="true" include_author="true" wrapper="div" id="-4553"] but it shows ONLY that post

  6. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    You'll need to add a new argument for the excluded ID's. Here's an example of how to do that: http://www.billerickson.net/code/display-posts-shortcode-exclude-posts/

    You would then use [display-posts not_in="4553"]

  7. bruceeisner
    Member
    Posted 1 year ago #

    When I use the post_type="event" id="x,y,z"] shortcode with x y and z being three different post ids on my blog, the posts do not show.

  8. magicmiles
    Member
    Posted 1 year ago #

    Ok, this isn't working out for me. I need this thing to display the actual POST and not a frakking LINK to the post, is that possible ??!?!?!?!? Its late, Im tired, and frakking cranky, can this piece of software do this or not ???

    I've tried using this method [display-posts category="blog" id="777"]
    this method [display-posts category="blog" posts_per_page="20"]

    these only display the LINK on the page, which is NOT what I want...

    I WANT THE ACTUAL POST CONTENT ON THE PAGE ?!?!?!?!?

    IS THAT POSSIBLE >!>!>!>!

  9. HGI
    Member
    Posted 1 year ago #

    Hi, I am trying to display custom posts "property" with tag zzzz..hence

    [display-posts post_type="property" tag="zzzz"]

    but nothing showing up...did I use that correctly?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic