I hope you are well today and thank you for your question.
You have to develop custom code using the action hook pre_get_posts and set the custom post type of it to your events plugin post type so your code will be as following.
function search_filter($query) {
if ( !is_admin() && $query->is_main_query() ) {
$query->set('post_type', 'event');
}
}
add_action('pre_get_posts','search_filter');
You can also use the following WordPress functions in the above code condition to check whether the displayed page is home page or front page so that other pages won’t be affected by this code.
You can use the developed custom code on your site by adding it in the functions.php file of your child theme or developing small plugin and adding the code in it.
Could you please share me the code that you have used to display it?
Please make sure you have selected “Shoe post excerpts” option in the Sparkling theme customization settings on the following path as shown in the attached screenshot.
I could confirm it on your site but to troubleshoot it as requested in the previous reply Could you please share me the code that you have used to display it?
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( ( is_home() && $query->is_main_query() ) || is_feed() )
$query->set( 'post_type', array( 'post', 'event', 'location', 'movie', 'quote' ) );
return $query;
}
//prevents formatting on the homepage if the events in homepage mod is used
function my_em_homepage_eventformats(){
if(is_home()){
add_filter('option_dbem_cp_events_formats',function(){return false;});
}
}
add_action('template_redirect','my_em_homepage_eventformats');
You should not make any changes in the Sparkling theme, instead you should make changes in the theme using child theme because if you make changes in the Sparkling theme file then you have to make these changes again after theme updation as changes made in the theme files get lost on theme updation which is not the case with child theme therefore please move any changes you have made in the Sparkling theme from it to the child theme.
We are always enhancing our themes and releases updates of it frequently but don’t worry these updates wont affect your child theme.