Index only desired categories - WordPress

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:


1 Like


You can customize the indexing decision of about any content type.
Please have a look here and tell me if that helps: Automated Synchronization

1 Like

Thank you for your reply!

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


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

1 Like