[wp-trac] [WordPress Trac] #58080: No results block is showing although results are found if filter is used

WordPress Trac noreply at wordpress.org
Tue Apr 4 10:08:04 UTC 2023


#58080: No results block is showing although results are found if filter is used
--------------------------+-----------------------------
 Reporter:  zodiac1978    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I added an additional condition to the `post_search` or `posts_where`
 filter:

 {{{
 $where .= " AND {$wpdb->posts}.post_content LIKE '%bar%'";
 }}}

 The title of one post is containing "foo" and I'm searching for "foo".

 Because "bar" is part of the post_content of this post and "foo" is part
 of the title, it shows the post as a search result.

 But the no results block is showing too.

 If no filter is modifying the search results, this is not showing.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58080>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list