Comments Paul started the conversationJanuary 15, 2014 at 12:44amHello... I've set up custom posts, and when I use the search feature, it will find the posts in the auto-fill feature, but lists them as "undefined"... how can I change "undefined" to "News item"? Thanks 1,069ThemeNectar repliedJanuary 17, 2014 at 1:33amHey Paul!Open up the wp-search-suggest.php located in the nectar/assets/functions/ajax-search directory and find this:else if(get_post_type($post->ID) == 'product'){ $suggestion['post_type'] = __('Product',NECTAR_THEME_NAME); }below that, you can add your own in like this:else if(get_post_type($post->ID) == 'news'){ $suggestion['post_type'] = __('News Items',NECTAR_THEME_NAME); }Just make sure the get_post_type($post->ID) == 'news' matches your custom post type name.Cheers :) Sign in to reply ...
Hey Paul!
Open up the wp-search-suggest.php located in the nectar/assets/functions/ajax-search directory and find this:
below that, you can add your own in like this:
Just make sure the get_post_type($post->ID) == 'news' matches your custom post type name.
Cheers :)