[Plugin: Events Manager] Break-Up / Show Events per date/date
-
Is there a way to break up the events list per day?
Where all events for the same date get a heading?ex:
MONDAY (or Mar 30)
Event 1
Event 2
Event 3
TUESDAY (or Mar 31)
Event 4
Event 5etc
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?
-
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?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/
here’s my page, but I want the days in the headers.
http://www.isyoga.dreamhosters.com/yoga-classes/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.
Thans
you can try to add this attribute
[events_list_grouped mode="daily" date_format="l - F j, Y"]
YOU GUYS ROCK!!!
agelonwl is correct on the shortcode format.FOR THE SEARCHERS
Here is the php code to group your eventshttp://pastebin.com/sW84UwNc
(pastebin seems better at storing code)Just in case pastebin messes up, here’s code for archive. although line wrapping may cause some of these to break
// CREATE EVENT HEADER, FOOTER, AND CONTENT AREA $featuredEvtHeader = ' <!-- START HEADER --> <table> <thead> <tr> <td> Date </td> <td> Activity </td> <td> Location </td> </tr> </thead> <tbody> <!-- END HEADER --> '; $featuredEvtFormat = ' <!-- START SINGLE FORMAT --> <tr> <td> #_{d/m/Y} #@_{- d/m/Y}<br/> #H:#i -#@H:#@i </td> <td> <a href="#_EVENTPAGEURL">#_EVENTNAME</a><br /> #_CATEGORY </td> <td> #_LOCATIONLINK<br /> <!--#_EXCERPT <a href="#_EVENTPAGEURL">Read more ...</a>--> </td> </tr> <!-- END SINGLE FORMAT --> '; $featuredEvtFooter = ' <!-- START FOOTER --> </tbody> </table> <!-- 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 the_content(); // 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( 'orderby'=>'event_start_date', 'pagination'=>1, 'limit'=>10, // the header above each content grouping (immediately following the DATE HEADER) 'format_header' => $featuredEvtHeader, // format each event's display 'format'=>$featuredEvtFormat, // 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 'mode'=>'daily', ) ); }
Thanks to you both for the date format!
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!
First thing to check
In your admin
Events>
[Formats/Layouts] TAB
Expand “Events Format”4th field down:
“No events message:” [___________________]Do you have this field filled out?
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.
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.domain.com/events-2/
domain.com/events-2/page-2/
domain.com/events-2/page-3/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”]Regards
Sujalthis shortcode [events_list_grouped mode=”daily” date_format=”l – F j, Y”] can be place on wordpress pages/post.
Thank you agelonwl. 🙂
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.
Or
Is there any other way to display “Cost”.Please let me know.
Thanks
#_ATT{Cost}
for example. It depends the exact name, check your settings and read this – http://wp-events-plugin.com/documentation/event-attributes/
- The topic ‘[Plugin: Events Manager] Break-Up / Show Events per date/date’ is closed to new replies.