Support » Plugin: Events Manager » how to exclude events in shortcode

  • Resolved evens

    (@evens)


    Hi all, I used the following shortcode in one page

    [events_list year="2014" pagination=1 limit=9][/events_list]

    (the site is setup as multisite so that each sub blog is one event) it worked great until the client removed one sub site without removing the event post first. Now the non existent blog event is still showing up,

    is there any way to exclude it from the listing or remove it from the database?

    I tried to manually remove the entry from the db wp_em_events table but it justbrake the entire database so I had to revert back but I’m stock in square one. I don’t know what to do at this point, any help would be greatly appreciated.

    https://wordpress.org/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • caimin_nwl

    (@caimin_nwl)

    Hi,

    Pretty sure if you change the event_status of the event in wp_em_events to NULL it’ll hide it.

    evens

    (@evens)

    Hi thanks for your reply!

    I tried that also but it didn’t hide it (and no, I don’t have any cache plugin on this server) it just throws the following on the error log:

    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_19_options' doesn't exist for query SELECT option_value FROM arl_19_options WHERE option_name = 'arl_19_user_roles' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Events::get, em_get_event, EM_Event->__construct, get_blog_post, switch_to_blog, WP_Roles->reinit, get_option
    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_19_posts' doesn't exist for query SELECT * FROM arl_19_posts WHERE ID = 9 LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Events::get, em_get_event, EM_Event->__construct, get_blog_post, get_post, WP_Post::get_instance
    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_3_options' doesn't exist for query SELECT option_value FROM arl_3_options WHERE option_name = 'arl_3_user_roles' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Event->output, EM_Event->get_permalink, get_blog_permalink, switch_to_blog, WP_Roles->reinit, get_option
    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_3_posts' doesn't exist for query SELECT * FROM arl_3_posts WHERE ID = 8 LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Event->output, EM_Event->get_permalink, get_blog_permalink, get_permalink, get_page_link, get_post, WP_Post::get_instance
    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_3_options' doesn't exist for query SELECT option_value FROM arl_3_options WHERE option_name = 'show_on_front' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Event->output, EM_Event->get_permalink, get_blog_permalink, get_permalink, get_page_link, get_option
    [05-Feb-2014 09:39:03 UTC] WordPress database error Table 'arieljer_dtex.arl_3_options' doesn't exist for query SELECT option_value FROM arl_3_options WHERE option_name = 'home' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/ariel/page-events-of-the-year.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, em_get_events_list_shortcode, em_locate_template, include('/plugins/events-manager/templates/templates/events-list.php'), EM_Events::output, EM_Event->output, EM_Event->get_permalink, get_blog_permalink, get_permalink, get_page_link, _get_page_link, home_url, get_home_url, get_option
    Philip John

    (@philipjohn)

    Hi,

    How exactly did your client delete the sub-site? What you’re describing doesn’t sound like expected behaviour from deleting a sub-site.

    Thanks

    evens

    (@evens)

    he removed the site from the network admin but I can tell you guys that I figured another way to fix this! The shortcode was just displaying one post which wasn’t suppose to be there so I added
    offset=1

    and it worked perfect. Thanks very much for taking the time guys!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to exclude events in shortcode’ is closed to new replies.