Skip to content
Display Posts

Display Posts

The simplest way to display a listing of posts in WordPress.

  • Home
  • Tutorials
  • Documentation
    • Documentation
    • Parameters
    • Filters
    • The Output Filter
    • Extensions
  • Support
  • More
    • Back

Filter: display_posts_shortcode_wrapper_close

Customize the outer closing markup for the entire listing. By default it is ul but can be changed to ol or div using the ‘wrapper’ attribute. Use this filter to change it to any HTML element.

Use section element for wrapper

Display Posts outputs an unordered list (<ul>) by default, but you can change this to an ordered list or div using If you would prefer a different wrapping element, like a <section>, you can use the following:

Posted byBill EricksonJanuary 4, 2019January 4, 2019Posted inDisplay Posts ShortcodeLeave a comment on Use section element for wrapper
Display Posts by Bill Erickson