When you should use this plugin:
- if you have registered post types
- if you use Simple Fields plugin
- if you created Media custom fields
- download it
- install and activate it
- a new option will appear in Settings: Search Simple Fiels
- go to the new option
2. - if the Simple Fields plugin is not activated, a warning message will appear, otherwise a list of defined field groups will be displayed
3.a. - if a function (see 3.b.) is defined for media custom fields, the defined fields are listed. For each field the user must insert the name of the option with which the field is saved in wp_postmeta table
3.b. - function used for Media custom fields (, for example insert in the Custom function field value xxx_custom_fields_function_name if you have in functions.php of your theme something like this: add_filter("attachment_fields_to_edit", "xxx_custom_fields_function_name", null, 2); )
To include the selected fields in the front wordpress search, add to your theme function.php file the lines below:
if(!is_admin()) : if(function_exists('search_simple_fields_search_posts')) : search_simple_fields_search_posts(); endif; endif;
Note: for Media type items the result of the search will be the posts (any type of registered post types which were initially included in the search query) it is attached to.
No comments:
Post a Comment