Support » Fixing WordPress » How to add category title of a post in the search?

  • I cant figure out how i’m supposed to add the category title to a post in the search. A post that comes up as a search result isn’t really in any category (since the search isn’t a category), so adding <?php single_cat_title; ?> to the search.php didn’t work.

    The purpose of this is the differentiate the types of posts on the site, so users know the difference when they search for a common term.

    Please help. Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to add category title of a post in the search?’ is closed to new replies.