WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
Incredibly useful plugin (3 posts)

4 stars
  1. Daniel Bachhuber
    Hand Built
    Posted 1 year ago #

    This shortcode is an indispensable tool for webmasters wanting to give full control to their users without giving them PHP or server-level access. It allows them to easily create new layouts of content.

    A nice enhancement (I know, I know, I should just submit a pull request) would be the ability to pass a custom layout to the shortcode so you can specify the markup you'd like around your posts.

  2. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    You are able to customize the layout/markup by using the display_posts_shortcode_output filter (for individual listings) and the display_posts_shortcode_wrapper_open and display_posts_shortcode_wrapper_close filters for the markup around the listings.

    But there's no way to do this without editing theme files or creating a plugin, which is what I think you're getting at.

    I think it would be great to see a Display Posts Shortcode Visual Editor plugin which adds a settings page that lets you customize the markup. You'd have three textareas (one for each filter), and some sort of way to indicate what field is used where. It might use shortcodes, so in the output filter specify:

    `<div class="listing-item"><div class="image">[dps_image]</div><div class="info">[dps_title] - [dps_excerpt]</div></div>'

    Since the vast majority of people wouldn't use this feature, I'd prefer it be in a separate plugin rather than add to the main one. But I do think it would be very useful for instances where you can't edit your theme files.

  3. Daniel Bachhuber
    Hand Built
    Posted 1 year ago #

    But there's no way to do this without editing theme files or creating a plugin, which is what I think you're getting at.

    Yeah, sorry if my suggestion was muddled.

    I think it would be great to see a Display Posts Shortcode Visual Editor plugin which adds a settings page that lets you customize the markup.

    Good suggestion. I'll let you know if I go down this route.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.