WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Plugin: Events Manager : No events message not showing (5 posts)

  1. magicsun
    Member
    Posted 1 year ago #

    Hi !

    I'm using shortcodes on a page, to show my events. This because I want to show current and past events on the same page.

    However, when using the shortcode to show current events, and there are no events, the "no events message" is not showing at all.

    When I visit the page containing the events itself, it does show, and also shows my custom message.

    This is the code i'm using:

    Recent nieuws:
    
    [events_list_grouped mode="monthly" date_format="F Y"][/events_list_grouped]
    
    Archief:
    
    [events_list_grouped mode="monthly" scope="past" order="DESC"][/events_list_grouped]

    The url is:
    http://www.sjante.nl/nieuws-2/

    When you visit: http://www.sjante.nl/evenementen-2/
    The message does show, but I can't get archives on there like i have on nieuws-2 (and custom headers etc) so i set up my own page and used shortcodes to display the content I would like.

    Thanks !

    Love,
    Mirna

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    could it be you have no past events?

  3. magicsun
    Member
    Posted 1 year ago #

    I have one past event, it shows up under "archief" subheader (dutch for "archive") which is perfect.

    However under "Recent nieuws" it should say that there are no events at the moment. The text however, is not showing.

    It is showing on the events page itself (the one that is installed by the plugin itself) --> http://www.sjante.nl/evenementen-2/
    But not on the page I want to be using --> http://www.sjante.nl/nieuws-2/

    Thanks,

    Love,
    Mirna

  4. agelonwl
    Member
    Posted 1 year ago #

    since you are using shortcode events_list_grouped; this suggestion is not an update proof.

    add this snippet to file events-manager/em-template-tags.php (function em_get_events_list_grouped) at around line 157

    if ( $events_count == 0){
     echo '<h3>'.get_option('dbem_no_events_message').'<h3>';
    }
    then to change the message Settings > Formats/Layouts > Events Format > No events message

  5. magicsun
    Member
    Posted 1 year ago #

    Perfect !

    Message appears. Added some future news, and the message gets replaced by the new news. Excellent :) I did removed the header tags, but if anyone needs them make sure to add a slash to the closing tag, it's missing in above code.

    I added above code before this code (around line 157):

    if( !empty($args['limit']) && $events_count > $args['limit'] && (!empty($args['pagination']) || !isset($args['pagination'])) ){
    		//Show the pagination links (unless there's less than $limit events)
    		$page_link_template = add_query_arg(array('pno'=>'%PAGE%'));
    		echo em_paginate( $page_link_template, $events_count, $args['limit'], $args['page']);
    	}
    	return ob_get_clean();
    }

    It's the last part of the "function em_get_events_list_grouped".

    Many thanks !

    Love,
    Mirna

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic