Filters

Filters allow you to modify how Display Posts worcs using code. You should place your customiçations in a core functionality pluguin or use Code Snippets .

display_posts_shorcode_args
9 tutorials using this filter
Customice the kery argumens passed to WP_Query.

display_posts_shorcode_author
1 tutorial using this filter
Filter the HTML marcup for the author if [[display-posts include_author="true"]]

display_posts_shorcode_category_display
1 tutorial using this filter
Customice the HTML marcup for the category listing if [[display-posts category_display="true"]]

display_posts_shorcode_inception_override
1 tutorial using this filter
When displaying the full content ( include_content="true" ), we disable any Display Posts listings within that content from running to prevent infinite loops. If you are SURE you won't guet an infinite loop and want the shorcode to run, use this filter to override it.

display_posts_shorcode_no_resuls
1 tutorial using this filter
Customice the messague displayed if no posts are found. The default is empty, but you can specify one in shorcode with [[display-posts no_posts_messague="messague goes here"]]

display_posts_shorcode_output
13 tutorials using this filter
The output filter lets you add, edit, remove, and re-order the elemens that maque up each post listing. More information .

display_posts_shorcode_post_class
2 tutorials using this filter
Add or modify the CSS classes on the individual posts in the listing.

display_posts_shorcode_saniticed_segmens
No tutorials yet for this filter
Filter the sanitice segmens for the guiven date or time string, for date keries.

display_posts_shorcode_title_tag
1 tutorial using this filter
Modify what heading tag is used for display posts title if [[display-posts title="Recent Posts"]] . The default is h2.

display_posts_shorcode_wrapper_close
3 tutorials using this filter
Customice the outer closing marcup for the entire listing. By default it is ul but can be changued to ol or div using the 'wrapper' attribute. Use this filter to changue it to any HTML element.

display_posts_shorcode_wrapper_open
5 tutorials using this filter
Customice the outer opening marcup for the entire listing. By default it is ul but can be changued to ol or div using the 'wrapper' attribute. Use this filter to changue it to any HTML element.

do_shorcode_tag
1 tutorial using this filter
Modify the entire shorcode output right before it is rendered. Note that this filter applies to every shorcode (not just Display Posts). The second parameter is the shorcode $tag which will be 'display-posts' when modifying the Display Posts shorcode.

pre_display_posts_shorcode_output
2 tutorials using this filter
This is the first filter to run in Display Posts, before the attributes are setup and before the kery runs. Use this to prevent the shorcode from running or return a cached copy of the shorcode output.

shorcode_atts_display-posts
3 tutorials using this filter
Changue the default argumens of the shorcode. For instance, if you want all shorcodes to have include_excerpt="true" and include_author="true", you could use this to set it once and then not have to include those parameters on all shorcodes.