• Hi everyone,

    I have a multilanguage site (Italian, the main, and English) with an event list in home page:

    events list is made through shortcode
    [events_list][/events_list] and

    function display_custom_search( $attr, $content = null ) {
    
    	$search_args = em_get_search_form_defaults();
    	em_locate_template('templates/events-search.php', true, array('args'=>$search_args));
    
    	$args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
    						if( !empty($args['ajax']) ){ echo '<div class="em-search-ajax">'; } //AJAX wrapper open
    						if( get_option('dbem_event_list_groupby') ){
    							em_locate_template('templates/events-list-grouped.php', true, array('args'=>$args));
    						}else{
    							em_locate_template('templates/events-list.php', true, array('args'=>$args));
    						}
    						if( !empty($args['ajax']) ) echo "</div>"; //AJAX wrapper close
    
        /*return '<a href="https://twitter.com/filipstefansson" class="twitter-button">' . $content . '</a>';*/
    }
    add_shortcode('custom_search', 'display_custom_search');

    There some link I have to add to make it work in my second home page?

    https://www.ads-software.com/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry I’m afraid that we can’t help with custom coding as per the support policy – https://eventsmanagerpro.com/support-policy/

    It’s not a custom coding, my problem is that EM doesn’t work with WPML plugin, that you say it’s compatible.

    I also installed “Events Manager and WPML Compatibility” plugin.

    events_list shortcode doesn’t work if you change language, even with wpml compatibility plugin is installed

    The shortcode you’re using is incorrect. You need to either add placeholders and formatting between the opening and closing tags, or just use the opening tag:

    [events_list]

    Thread Starter fersamp

    (@fersamp)

    Hi caimin_nwl,
    thank you for help.

    I explain better the situation:
    I have 3 tabs in my home page
    1) Today events
    2) Tomorrow events
    3) Choose one day to filter events

    For the 1st and 2nd I used:
    [custom_events]today[/custom_events] and [custom_events]tomorrow[/custom_events] that invoke my custom function

    function display_custom_events( $attr, $content = null ) {
    ob_start();
    echo do_shortcode('[events_list scope="' . $content. '" limit=3 pagination=1 ajax=1][/events_list]');
    return ob_get_clean();
    }
    add_shortcode('custom_events', 'display_custom_events');

    For the 3rd tab I use custom search because this is the only way I found to filter events by date in a tab page:
    [custom_search][/custom_search] that invokes

    function display_custom_search( $attr, $content = null ) {
    
    	$search_args = em_get_search_form_defaults();
    	em_locate_template('templates/events-search.php', true, array('args'=>$search_args));
    
    	$args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
    						if( !empty($args['ajax']) ){ echo '<div class="em-search-ajax">'; } //AJAX wrapper open
    						if( get_option('dbem_event_list_groupby') ){
    							em_locate_template('templates/events-list-grouped.php', true, array('args'=>$args));
    						}else{
    							em_locate_template('templates/events-list.php', true, array('args'=>$args));
    						}
    						if( !empty($args['ajax']) ) echo "</div>"; //AJAX wrapper close
    
        /*return '<a href="https://twitter.com/filipstefansson" class="twitter-button">' . $content . '</a>';*/
    }
    add_shortcode('custom_search', 'display_custom_search');

    For italian it works today events and tomorrow filter.
    Custom filter has been working for a long time, but now not (I suppose is something about ajax=1, but I need it to show results for tab 1 and 2 in the same page, to avoid redirect to events page)…

    Every filter doesn’t work in the other languages in any case ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘EM events list not working in English version Home Page’ is closed to new replies.