• Hi, I would be grateful if someone can help me showing the category of the post along with its title. This is because I have posts in different categories with the same title, so when I search for a term, let’s say “Chaplin”, the live search suggests me “Charlie Chaplin” let’s say twice, but I don’t know which categories they belong to. I’d like to have search suggestions like “Charlie Chaplin (Directors)” and “Charlie Chaplin (Actors)”, where obviously Directors and Actors are the name of categories. I think it’s something related to this line in wp-search-suggest.php:

    $results = apply_filters( 'wpss_search_results', wp_list_pluck( $query->posts, 'post_title' ), $query );

    but I don’t know how to change “post_title” with the thing I want to show.

    Thanks a lot.
    Fede

  • The topic ‘Show category with title in live search’ is closed to new replies.