I want to create a custom post type with fields: Text1, text2 and text3.
I want to make this custom post type searchable.
But searchable fields will only be Text1, and text2.
Is this possible?
Thanks
I want to create a custom post type with fields: Text1, text2 and text3.
I want to make this custom post type searchable.
But searchable fields will only be Text1, and text2.
Is this possible?
Thanks
You must be logged in to post a comment.
With WP’s default search – no.
But you can with this plugin. Select “Lucene” or “Mysql Fulltext” (Zend Lucene is a little faster) as the search engine, check the “post meta” module and select the meta fields you want to search in the module settings. Then re-index
You’ll also have to edit the models/spider.php from the plugin dir to include custom post types – Search for instances of
{$wpdb->posts}.post_type
and add the appropriate custom post type slug there…