WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Listing layout question (11 posts)

  1. bvinson
    Member
    Posted 1 year ago #

    Is it possible to have the output listing in multiple columns?

    I'm presently doing this manually at http://www.buckner.org.php53-13.ord1-1.websitetestlink.com/

    It is the "latest news" section.

    I want to do something similar on internal pages for ministries/ projects.

    As an example, when someone goes to our "Foster care and adoption" page, I want to have the most recent 5-10 stories in that category show up.

    If I use more than one tag, the same stories would be in each listing, right?

    Trying to figure out how to do a layout of stories and not have them repeat or in one long listing...

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

  2. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

  3. bvinson
    Member
    Posted 1 year ago #

    Thanks, I'll try this.

    What shortcode adjustments do I need to make so the listings 'know' they should be in 3 (or whatever) columns?

  4. ElginC
    Member
    Posted 1 year ago #

    And please where to put those codes (the php and the css). Thank you.

  5. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    That code I linked to will make it in 3 columns. If you want to change it (for instance, to 4 columns) you'd change 'one-third' to 'one-fourth' and the '3' on line 14 to a '4'.

    The php goes in your theme's functions.php and the css goes in your theme's style.css. Each code snippet says in which file it belongs in the bottom right corner.

  6. bvinson
    Member
    Posted 1 year ago #

    Thanks!

    So what you're saying is every time I use the short code it will be in "X" columns that I set it at in the function.php?

    I pick the image size and how much text I want to show, but the 'default' layout will be in "x" columns- just restating a diff way...

  7. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    If you use the code listed above, then yes, all uses of that shortcode will display it in the same number of columns. If you'd like to control it on a per-use basis, add a new parameter to the shortcode (ex: [display-posts columns="2"] ) and modify the PHP to check for that first.

  8. cre8ivedm
    Member
    Posted 1 year ago #

    Bill, how would one modify the php in order to control it on a per use basis?

  9. tsoheili
    Member
    Posted 1 year ago #

    What would you suggest if I wanted to show the categories being shown. I really have many categories for each item but only want specific ones to show up. I think that will be on my end with conditionals, but just not sure how to get the short code to know what to spit out.

  10. gezginrocker
    Member
    Posted 12 months ago #

    I am using the solution above on this site.

    Does anyone know how can I move the permalink above the thumbnail, and excerpt below the thumbnail?

    Thanks

  11. ultramalcolm
    Member
    Posted 10 months ago #

    I'd like to know how to use this code on a per-use basis, as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic