You can use the title parameter in the shortcode to add a title above the listing of posts. But what if you want that title to dynamically include the post count? We’ll use the shortcode_atts_display-posts filter to modify the default parameters for the shortcode. If the shortcode does not have a title specified, we’ll give […]
Filter: do_shortcode_tag
Modify the entire shortcode output right before it is rendered. Note that this filter applies to every shortcode (not just Display Posts). The second parameter is the shortcode $tag
which will be ‘display-posts’ when modifying the Display Posts shortcode.