Support » Plugin: Display Posts Shortcode » [Plugin: Display Posts Shortcode] "Wrapper" option not available

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Bill Erickson


    Are you sure you’re using it correctly?

    [display-posts] or [display-posts wrapper=”ul”] displays an unordered list.

    [display-posts wrapper=”ol”] displays an ordered list

    [display-posts wrapper=”div”] displays nested divs

    I’ve just tested and confirmed with the current version of the plugin.

    For other display options, like a comma-separated list, you’ll need to use the filters. There’s one filter for the opening wrapper (so set that to <p>), one wrapper for the closing wrapper (so set that to </p>), and one for the markup of each individual post. Here’s an example ( ). For the individual posts, I wrapped each one in a span and only included the title. I’ve left all the parameters of the filter in place in case you want to add other content to the list.

    Pretty sure. A search of the source show no hit on ‘wrapper’, specifically there no mention of it in the shortcode_atts array. It says 1.6 at the top.

    Thanks for the filter!

    So, I updated manually. Still 1.6, but now the wrapper option is there.

    And, by the way, it’s unbelievably easy to just paste the filter in to the functions.php of a child theme, that way no modifications are lost on either wordpress, plugin or theme upgrade!

    Plugin Author Bill Erickson


    Here’s the actual plugin code:

    If you search, you’ll see ‘wrapper’ is mentioned 18 times. If you try the three shortcodes listed above you’ll get the desired result.

    Yes, it is easy to put the filter in a child theme so it isn’t lost on update. That’s the purpose of the filters 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Display Posts Shortcode] "Wrapper" option not available’ is closed to new replies.