WordPress.org

Ready to get started?Download WordPress

Forums

Show categories in search result (5 posts)

  1. snakefoot
    Member
    Posted 6 years ago #

    Hi ya

    When performing a search on my blog, then I want it to show what categories that contains posts, which matches the search-query.

    I want to use this category information, so when clicking the link of a category in the search-result, then it will limit the search to that category alone. And when displaying posts that matches a certain tag, then one can give the user the option to only display tagged posts within a matching category.

    I know I can get the category of a post within the loop, but I want to list all the matching categories before entering the search result loop.

    Is there an existing simple hack or plugin which can provide this kind of functionality ?

    Thank you in advance

    -Rolf

  2. snakefoot
    Member
    Posted 6 years ago #

    bump

  3. snakefoot
    Member
    Posted 6 years ago #

    Well created a plugin myself, so relevant categories are shown in the search result:

    http://smallvoid.com/?s=defrag

    http://smallvoid.com/tag/defrag/

  4. blueperil
    Member
    Posted 6 years ago #

    does anyone know how to do this? this is exactly what I'm after...

    snakefoot - come back!

  5. snakefoot
    Member
    Posted 6 years ago #

    My blog is pretty much locked to WP 2.0 because of bug #5034. The plugin I have created doesn't make use of the new category and tagging system introduced with WP 2.3+, or supports the Widget interface.

    When I get lots of time on my hands then I will consider updating the plugin to work with the latest version of WP.

    The plugin I have created pretty much repeats the query for posts, but without the post-limit, and then iterates through all the posts and groups them by category.

Topic Closed

This topic has been closed to new replies.

About this Topic