Custom post types?
-
This plugin seems to only search Posts, can I make it do other, or all, post types?
-
Hey Topher,
For “Search page” settings, it should be indexing and thus also searching any post type that hasn’t been set to “exclude from search = true” in the post type settings.
For Autocomplete settings, if you’ve checked just “Posts”, then it would be just the “post” post type, but if you use the “All Posts” option, it should reuse the same index that the “Search page” uses, and adhere to that “exclude from search” setting as well.
I’m using the search page, to replace the default search. In the settings these are my only options, and I’m using the middle one. Still only getting posts. 🙁
Do not use Algolia
Do not use Algolia for searching at all. This option disables the plugin completely Use Algolia with the native WordPress search templateSearch results will be powered by Algolia and will use the standard WordPress search template for displaying the results.
This option has the advantage to play nicely with any theme but does not support filtering and displaying instant search results. Use Algolia with Instantsearch.jsThis will replace the WordPress search page with an instant search experience powered by Algolia.
By default you will be able to filter by post type, categories, tags and authors.Have you verified you have more than just “post” post type posts indexed in algolia? are you trying a search query that should for sure return a result for some of those post types? I’m assuming that there’s not code somewhere restricting the types that get indexed.
How do I verify that? I haven’t written any custom code around search. I have a PT called Contributors and a title with “Rahul” in it, and he doesn’t show up. Nor does he in other post types where he should.
You’ll have to log in to your account at algolia.com and visit the search section for the
wp_searchable_postsindex and browse the content there, to see what has actually made it all the way up.I think I found the right spot, but I don’t understand it well. Are there docs someplace on how to do this?
If you’re referring to browsing your Algolia.com dashboard, it’s all going to be their documentation.
Example URL for when I’m browsing one of my indexes:
https://dashboard.algolia.com/apps/MY APP ID HERE/explorer/browse/wp_searchable_posts?searchMode=search
You’ll need to fill in the App ID value with your own ID.
There you’ll be able to see what content you have as well as UI to amend/adjust index configuration settings (same thing that the “push settings” manage on the WP side, via code).
Did you ever get this figured out Topher?
Nope, I gave up. I couldn’t find a place in the Algolia admin to say what post types.
Hmm. Not sure at the moment, without being able to revisit. If you decide to try again, let us know and we’ll see if we could do a bit more in depth help. You know how to find us.
The topic ‘Custom post types?’ is closed to new replies.