Index only desired categories - WordPress

wordpress
indexing
categories

#1

Hello friends.

I use WordPress with Algolia, on a business directory page.
I have a lot of posts and categories.

I want to make three categories called:

  • Companies
  • Industries
  • Activities

Can I in any way index only those categories? And leave out the rest of categories, posts and pages.

In this way, I can assign the desired posts to one of those categories. So that only the posts I want to be searchable, will be searchable.

I really appreciate your help :hearts:

Thanks
Taulant


#2

Hello,

You can customize the indexing decision of about any content type.
Please have a look here and tell me if that helps: https://community.algolia.com/wordpress/indexing-flow.html#indexing-decision


#3

Thank you for your reply!

How exactly do I use this snippet? Where to put it?


#4

This snippet can be added to the functions.php file of your active theme.