Display Posts icon
Content & Editing

Display Posts hooks reference

  • By Bill Erickson
  • v3.0.3
  • Updated

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.

functions.phpyour child theme
// 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

  • display-posts-shortcode.php line 531
    /**
     * 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 );
  • display-posts-shortcode.php line 593
    /**
     * 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 );
  • display-posts-shortcode.php line 802
    /**
     * Filter whether to disable the display-posts shortcode.
     */
    apply_filters( 'display_posts_shortcode_inception_override', true );
  • display-posts-shortcode.php line 481
    /**
     * Filter content to display if no posts match the current query.
     */
    apply_filters( 'display_posts_shortcode_no_results', wpautop( $no_posts_message ) );
  • display-posts-shortcode.php line 629
    /**
     * 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 );
  • display-posts-shortcode.php line 609
    /**
     * 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 );
  • display-posts-shortcode.php line 778
    /**
     * Filter the sanitized segments for the given date or time string.
     */
    apply_filters( 'display_posts_shortcode_sanitized_segments', $segments, $date_time, $type );
  • display-posts-shortcode.php line 668
    /**
     * Filter the shortcode output title tag element.
     */
    apply_filters( 'display_posts_shortcode_title_tag', 'h2', $original_atts );
  • display-posts-shortcode.php line 654
    /**
     * Filter the shortcode output's closing outer wrapper element.
     */
    apply_filters( 'display_posts_shortcode_wrapper_close', '</' . $wrapper . '>', $original_atts, $dps_listing );
  • display-posts-shortcode.php line 643
    /**
     * 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 );
  • display-posts-shortcode.php line 46
    /**
     * Short circuit filter.
     */
    apply_filters( 'pre_display_posts_shortcode_output', false, $atts );
  • the_content

    filter
    display-posts-shortcode.php line 568
    /**
     * This filter is documented in wp-includes/post-template.php
     */
    apply_filters( 'the_content', get_the_content() );
  • display-posts-shortcode.php line 472
    apply_filters( 'display_posts_shortcode_args', $args, $original_atts );
  • display-posts-shortcode.php line 543
    apply_filters( 'display_posts_shortcode_full_manual_excerpt', false );
  • display-posts-shortcode.php line 539
    apply_filters( 'excerpt_length', 55 );
  • excerpt_more

    filter
    display-posts-shortcode.php line 540
    apply_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: