Events Manager
[resolved] Break-Up / Show Events per date/date (19 posts)

  1. Acts7
    Posted 3 years ago #

    Is there a way to break up the events list per day?
    Where all events for the same date get a heading?

    MONDAY (or Mar 30)
    Event 1
    Event 2
    Event 3

    TUESDAY (or Mar 31)

    Event 4
    Event 5

    I can get a repeated list which shows the date for every entry.
    But if there are events on the same date/day, I'd like to only show the date/day once as a header.

    Any suggestions?


  2. Acts7
    Posted 3 years ago #

    Sorry - further notes:
    It can be done in the calendar view.
    So the function is there I'm just not sure if its a function I can hook into and call
    Or if I need to write something from scratch?

  3. Rob Rusnak
    Posted 3 years ago #

    I need the same and it works, but it goes by date, not just the Day header, and I cannot figure out how to get it to show just the day (without diving into the templates yet)

    in your shortcode use mode="daily" which is default anyway.

    see "mode" on this page http://wp-events-plugin.com/documentation/shortcodes/

  4. Rob Rusnak
    Posted 3 years ago #

    here's my page, but I want the days in the headers.

    Does anyone know an easy way to get the Day to show in the header?

    So instead of just the Date, I want:

    Thursday - March 22, 2012

    There doesn't seem to be a way to effect the headers via the shortcodes.


  5. agelonwl
    Posted 3 years ago #

    you can try to add this attribute [events_list_grouped mode="daily" date_format="l - F j, Y"]

  6. Acts7
    Posted 3 years ago #

    agelonwl is correct on the shortcode format.

    Here is the php code to group your events

    (pastebin seems better at storing code)

  7. Acts7
    Posted 3 years ago #

    Just in case pastebin messes up, here's code for archive. although line wrapping may cause some of these to break

    $featuredEvtHeader = '
        <!-- START HEADER -->
        <!-- END HEADER -->
    $featuredEvtFormat = '
        <!-- START SINGLE FORMAT -->
                    #_{d/m/Y} #@_{- d/m/Y}<br/>
                    #H:#i -#@H:#@i
                    <a href="#_EVENTPAGEURL">#_EVENTNAME</a><br />
                    #_LOCATIONLINK<br />
                    <!--#_EXCERPT <a href="#_EVENTPAGEURL">Read more ...</a>-->
        <!-- END SINGLE FORMAT -->
    $featuredEvtFooter = '
        <!-- START FOOTER -->
        <!-- END FOOTER -->
    if (class_exists('EM_Events')) {
    	//	Get link to the main calendar of events
    	$event_page_link = trailingslashit(get_permalink(get_option("dbem_events_page"))); 
    	//	Echo a page title called "DAILY EVENTS"
    	//	(we're sorting by days but could sort by weeks or months or years)
    	echo '<h2 class="entry-title" class="header"><a href="'.$event_page_link.'">Daily Events</a></h2>';
    	//	START IGNORE - but if you need this code I'd be happy to provide it)
    	//  ADD "featured-image" from the page admin
    	$my_featured_image = my_postimage_picker($myimagetype='post-thumbnails', 0, $myimageclass='header-image');
    	echo $my_featured_image;
    	//	END IGNORE
    	//	place any CMS copy / text below the heading and main photo
    	//	This is the default php to echo the events
    	//	NOTICE it is commented out as we are calling a separate funciton
    	//echo EM_Events::output( array(
    	//	echo the grouped events so we can have headers above each group
    	//  	echo GROUPED events (I'm chosing 'daily' to get a DATE header,
    		//	this way I don't have to repeat the date for each entry under the same date)
    	//	This will accept all of the same arguments as EM_Events
    	echo em_events_list_grouped( array(
    		//	the header above each content grouping (immediately following the DATE HEADER)
    		'format_header' => $featuredEvtHeader,
    		//	format each event's display
    		//	the footer below each content grouping (what closes each content group)
    		'format_footer' => $featuredEvtFooter,
    		//	determines how to group the events.
    			//	choices are 'daily', 'weekly', 'monthly', 'yearly'
    			//	each of those will place a header above that group
    			//	so 'daily' will put the date, then list all events under that date
    	) );
  8. Rob Rusnak
    Posted 3 years ago #

    Thanks to you both for the date format!

  9. Txau
    Posted 3 years ago #

    Hi, Everything working fine with the grouped query, but, i don´t know why i can´t get the advise when no events founded. Any idea of why? does happens the same to you Acts7? Am i missing something?

    Thanks in advance!

  10. Acts7
    Posted 3 years ago #

    First thing to check
    In your admin
    [Formats/Layouts] TAB
    Expand "Events Format"

    4th field down:
    "No events message:" [___________________]

    Do you have this field filled out?

  11. Txau
    Posted 3 years ago #

    Yes, of course i do have this field filled out. I've been testing a lot and with a query using the output method of Em_Events class this does'nt happens. It only happens to me when using the custom query through the em_events_list_grouped function.

  12. pyarasujal
    Posted 3 years ago #

    Hi All,
    I need the same. but having some issue.
    [events_list_grouped mode="daily" date_format="l - F j, Y"]
    I am placing this code to Events > Setting > Formats/Layouts > Events Format in second box "Default event list format". But it is showing the same for all navigation pages.


    for all the pages it is repeating the 10 list of events.

    Please let me know where and in which box need to place this code??
    [events_list_grouped mode="daily" date_format="l - F j, Y"]


  13. agelonwl
    Posted 3 years ago #


    this shortcode [events_list_grouped mode="daily" date_format="l - F j, Y"] can be place on wordpress pages/post.

  14. pyarasujal
    Posted 3 years ago #

    Thank you agelonwl. :-)

  15. pyarasujal
    Posted 3 years ago #

    Hi agelonwl,
    I want to add a (cost)price. I can see it in the last of "Add Event" page, that is "Attributes" tab with a field "Attribute Name" that is "Cost" and "Value" is a input box and I have put $20 there.

    How can I display this $20 on my Event Page.
    Is there any other way to display "Cost".

    Please let me know.


  16. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #


    for example. It depends the exact name, check your settings and read this - http://wp-events-plugin.com/documentation/event-attributes/

  17. pyarasujal
    Posted 3 years ago #

    Thanks Marcus!

    Thanks again.

  18. pl77
    Posted 3 years ago #

    Here's a question...on your very first post, how would you format the headers "MONDAY (or Mar 30)" as different font/style? Right now, mine are H3 and I want them to be H5 but can't figure out where to change the settings/code. Any help is greatly appreciated!

  19. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    atm you'd have to hack the plugin, template-tags.php around line 170 onwards, but they should be h2 and not h3 tags

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic