Making a post type hidden from search (Algolia)
To make a custom post type hidden from search results in Algolia, you can use the 'exclude_from_search' argument when registering the post type in WordPress, as shown in the previous example.
You can also exclude the custom post type from Algolia's search index by modifying the Algolia plugin's indexing settings. To do this, follow these steps:
- Log in to your WordPress site as an administrator.
- Go to "Algolia Search" > "Settings" in the WordPress dashboard.
- In the "Indexing" tab, scroll down to the "Post Types" section.
- Uncheck the box next to the custom post type you want to hide from search results.
- Click the "Save Changes" button.
This will prevent the custom post type from being included in the Algolia search index. It will still be visible on your website, but it will not appear in search results.