Title: Question about no_posts_message parameter
Last modified: January 16, 2024

---

# Question about no_posts_message parameter

 *  Resolved [tpphost](https://wordpress.org/support/users/tpphost/)
 * (@tpphost)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/question-about-no_posts_message-parameter/)
 * This plugin was exactly what I needed from my client custom setup. Thank you 
   so much for creating this.
 * I do have one question for you. Is there a way for ‘no_posts_message’ to include
   basic HTML code? My client wanted a simple message for this, but it includes 
   things like B, BR, A HREF.
 * Thank you for your time.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/question-about-no_posts_message-parameter/#post-17348355)
 * The shortcode can’t accept HTML, but there’s a PHP filter you can use to customize
   or change the output to anything you’d like: display_posts_shortcode_no_results
 * Here’s an example:
 *     ```wp-block-code
       add_filter( 'display_posts_shortcode_no_results', function( $message ) {
       return '<p><strong>No results found:</strong> You might try <a href="' . home_url() . '">checking the homepage</a>.</p>';
       } );
       ```
   
 *  Thread Starter [tpphost](https://wordpress.org/support/users/tpphost/)
 * (@tpphost)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/question-about-no_posts_message-parameter/#post-17348810)
 * Worked perfect. Thank you very much 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Question about no_posts_message parameter’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [tpphost](https://wordpress.org/support/users/tpphost/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/question-about-no_posts_message-parameter/#post-17348810)
 * Status: resolved