WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Acts7
    Member
    Posted 2 years ago #

    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 5

    etc
    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?

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

  2. Acts7
    Member
    Posted 2 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. RRusnak
    Member
    Posted 2 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. RRusnak
    Member
    Posted 2 years ago #

    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

  5. agelonwl
    Member
    Posted 2 years ago #

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

  6. Acts7
    Member
    Posted 2 years ago #

    YOU GUYS ROCK!!!
    agelonwl is correct on the shortcode format.

    FOR THE SEARCHERS
    Here is the php code to group your events

    http://pastebin.com/sW84UwNc
    (pastebin seems better at storing code)

  7. Acts7
    Member
    Posted 2 years ago #

    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',
    	) );
    }
  8. RRusnak
    Member
    Posted 2 years ago #

    Thanks to you both for the date format!

  9. Txau
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    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?

  11. Txau
    Member
    Posted 2 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
    Member
    Posted 2 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.

    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
    Sujal

  13. agelonwl
    Member
    Posted 2 years ago #

    @pyarasujal

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

  14. pyarasujal
    Member
    Posted 2 years ago #

    Thank you agelonwl. :-)

  15. pyarasujal
    Member
    Posted 2 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.
    Or
    Is there any other way to display "Cost".

    Please let me know.

    Thanks

  16. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    #_ATT{Cost}

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

  17. pyarasujal
    Member
    Posted 2 years ago #

    Thanks Marcus!
    Done!

    Thanks again.

  18. pl77
    Member
    Posted 1 year 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 1 year 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

About this Topic