Display Posts 3.0.3 has 0 actions and 17 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Change a value Display Posts is about to use
add_filter( 'display_posts_shortcode_author', function( $value, $original_atts ) {
// Change $value here.
return $value;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter the HTML markup to display author information for the current post. */ apply_filters( 'display_posts_shortcode_author', ' <span class="author">by ' . get_the_author() . '</span>', $original_atts ); -
/** * Filter the list of categories attached to the current post. */ apply_filters( 'display_posts_shortcode_category_display', $category_display_text, $terms, $category_display, $original_atts ); -
/** * Filter whether to disable the display-posts shortcode. */ apply_filters( 'display_posts_shortcode_inception_override', true ); -
/** * Filter content to display if no posts match the current query. */ apply_filters( 'display_posts_shortcode_no_results', wpautop( $no_posts_message ) ); -
/** * Filter the HTML markup for output via the shortcode. */ apply_filters( 'display_posts_shortcode_output', $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ); -
/** * Filter the post classes for the inner wrapper element of the current post. */ apply_filters( 'display_posts_shortcode_post_class', $class, $post, $dps_listing, $original_atts ); -
/** * Filter the sanitized segments for the given date or time string. */ apply_filters( 'display_posts_shortcode_sanitized_segments', $segments, $date_time, $type ); -
/** * Filter the shortcode output title tag element. */ apply_filters( 'display_posts_shortcode_title_tag', 'h2', $original_atts ); -
/** * Filter the shortcode output's closing outer wrapper element. */ apply_filters( 'display_posts_shortcode_wrapper_close', '</' . $wrapper . '>', $original_atts, $dps_listing ); -
/** * Filter the shortcode output's opening outer wrapper element. */ apply_filters( 'display_posts_shortcode_wrapper_open', '<' . $wrapper . $wrapper_class . $wrapper_id . '>', $original_atts, $dps_listing ); -
/** * Short circuit filter. */ apply_filters( 'pre_display_posts_shortcode_output', false, $atts ); -
the_content
filter/** * This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_content', get_the_content() ); -
the_permalink
filter/** * This filter is documented in wp-includes/link-template.php */ apply_filters( 'the_permalink', get_permalink() ); -
display_posts_shortcode_args
filterapply_filters( 'display_posts_shortcode_args', $args, $original_atts ); -
apply_filters( 'display_posts_shortcode_full_manual_excerpt', false ); -
excerpt_length
filterapply_filters( 'excerpt_length', 55 ); -
excerpt_more
filterapply_filters( 'excerpt_more', '' );
Generated from Display Posts's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: