Comments François-Xavier started the conversationDecember 7, 2018 at 3:26pmHi,Do you have any tips/codes in order to include my Stachethemes events in the list of the search result (from the search bar in the7 Wordpress Theme) ?Thank you so much,F-X 894Zhivko repliedDecember 10, 2018 at 10:16amAdd in your theme functions.php following filter: add_action('pre_get_posts', function($query) { if (!is_admin() && $query->is_main_query()) { if ($query->is_search) { $query->set('post_type', array('post', 'stec_event')); } }}); Stachethemes DeveloperFrançois-Xavier repliedDecember 10, 2018 at 12:42pmHi,It's working, thank you so much ! F-X Sign in to reply ...
Hi,
Do you have any tips/codes in order to include my Stachethemes events in the list of the search result (from the search bar in the7 Wordpress Theme) ?
Thank you so much,
F-X
Add in your theme functions.php following filter:
Stachethemes Developer
Hi,
It's working, thank you so much !
F-X