Support » Plugins and Hacks » [Plugin: Relevanssi – A Better Search] Possible to index Category Archive titles descriptions?

[Plugin: Relevanssi – A Better Search] Possible to index Category Archive titles descriptions?

  • Hi,

    It would be useful if Relevanssi also indexes the Title and Description for each category, because the category archive may be the most relevant result for the search term. For example if somebody searches for ‘animals’ and there is a category with the title ‘Animals’ and the category description also includes animals then the main Category archive is probably more relevant than individual posts with that word. Right now the category archive doesn’t appear in results at all. Would you please consider adding the ability to index the Category title and description?

    Thanks & Regards!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mikko Saari


    Category archives don’t appear in the results, because they’re not posts or pages. Relevanssi can’t index anything that cannot be called using the get_post() function, which only fetches posts and pages.

    There is a way to get category archives indexed, but it is very complicated. It requires a custom post type and a method to get the category archive pages dumped to those posts so they can be indexed and so on… It’s complex and I haven’t ever done it myself.

    Actually, writing this gave me an idea how it could be done easier. Perhaps in a future version.

    Thanks very much for the reply. Since my category archives would be the most relevant result for many searches, I really need to figure out a way to get them indexed. I saw on the Relevanssi’s Facebook page about indexing author pages using custom post types, I guess I could do something similar… but I guess that would require creating a new post for each category and setting up redirects from each post to it’s corresponding archive – and with over 100 categories on 4 blogs that would require a lot of setup and maintenance. Still, it’s a possible solution.

    I do have one more question, you mentioned using custom post types – can you please explain why using a custom post type would be useful for this? Perhaps due to my lack of experience with custom post types, I can’t see the advantage of using them in this situation…


    Plugin Author Mikko Saari


    It has to be a custom post type because that way the posts can be hidden from users (only Relevanssi needs to see them). Hiding regular posts is harder. It’s a possible solution, but it gets complex soon.

    Here’s my idea on how this could be done: I could add a new function for Relevanssi, which you could then use on your search result page. The function would take the search query and return a list of matching categories based on category titles and descriptions.

    So, you could start the results with “Here’s categories that match”, then follow with the regular search result listing, or do it the other way around if that’s better.

    How’d you like this one?

    Yes that solution would work great, it’s an excellent idea! Thanks for considering my suggestion 🙂

    What about mentioned feature? Will it be possible to index custom taxonomies titles/names?
    It’s higly awaiting feature, that I would be thankful for.

    Plugin Author Mikko Saari


    As I said, it’s not possible, because they are not posts. Well, it’s possible, and somebody did it, but it takes lots of hacking. I can do a custom mod to that effect, but it’ll cost several hundred euros.



    Any luck in indexing wordpress’ normal categories/descriptions yet?

    Sorry for the thread necro, no sense in duplicating a thread that already exists.

    I don’t think this plugin does it yet, but I’ve been using a ‘Category Search’ plugin which provides the category search results above the results provided by Relevanssi. It’s good, although I think it only searches the category title, not category description.

    Search Categories

    Relevanssi plus the above plugin work well together!



    Thats a broken link. Is it this plugin?


    Yes it’s the same plugin. But my link is not broken, it works when I click it! 🙂

    Plugin Author Mikko Saari


    Yes, Relevanssi does index and search for category archives, but only in the Premium version.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Possible to index Category Archive titles descriptions?’ is closed to new replies.