Support

Home Forums Event Espresso Premium Add additional info

Add additional info

Posted: September 9, 2012 at 12:46 pm


emoria

September 9, 2012 at 12:46 pm

Hi,

How can I add event time and price to the event listing page? It’s being displayed with the [ESPRESSO_EVENTS] shortcode and category filter with a few mods for recurring events etc.?

This is what it looks like now:

Rockin Dance Nursery Drop In – Ages 9-16 Months
September 15, 2012

Register Now

This is what I’d like it to look like:

Rockin Dance Nursery Drop In – Ages 9-16 Months
September 15, 2012 – x:xxpm
$xx.xx
Register Now


Dean

September 10, 2012 at 4:35 am

Hello Emoria,

If this page is being used as a general listings page you could try using the [EVENT_LIST] shortcode Shortcodes


emoria

September 16, 2012 at 10:05 am

Looking at the code I don’t see any echo for time in the event_list_display. I think I know what line needs to be changed but I don’t think that the time field is being pulled into the array. How can I get around this> also any idea if there is any new handling of recurring events in 3.2?


Dean

September 17, 2012 at 8:44 am

Hi

Adding this to the event_list_display.php will show the time, you just need to place it where you want it to go (probably directly after the Event Date code, but before the closing </p> tag

<?php echo " - " . event_espresso_get_time($event_id, $format = 'start_time'); ?>

Note I added in the " - " . bit to put a dash before the time, you can remove/change it if needed.


emoria

September 18, 2012 at 8:42 pm

I think why this isn’t so straight forward for me is because I’m using an altered event_list_display.php to display my recurring events. I’d really like to be able to display recurring events that within one “class or program” logically without hacking the the templates too much. Will there be any changes to accommodate this in the coming versions? This is what my event_list_display.php looks like.

    &lt;?php 
//This is the event list template page.
//This is a template file for displaying an event lsit on a page.
//There should be a copy of this file in your wp-content/uploads/espresso/ folder.
/*
* use the following shortcodes in a page or post:
* [EVENT_LIST]
* [EVENT_LIST limit=1]
* [EVENT_LIST show_expired=true]
* [EVENT_LIST show_deleted=true]
* [EVENT_LIST show_secondary=true]
* [EVENT_LIST show_recurrence=true]
* [EVENT_LIST category_identifier=your_category_identifier]
*
* Example:
* [EVENT_LIST limit=5 show_recurrence=true category_identifier=your_category_identifier]
*
*/
$first_event_instance = $events_group[0];
$first_event_excerpt = array_shift(explode(&#039;<!--more-->', html_entity_decode($first_event_instance['event_desc'])));

?&gt;

&lt;div id=&quot;event_data-" class="event_data subpage_excerpt r   event-data-display event-list-display event-display-boxes"&gt;

    &lt;h2 id=&quot;event_title-" class="event_title"&gt;

     1) :
            //Show short descriptions
            if ($first_event_excerpt != '' &amp;&amp; isset($org_options['display_short_description_in_event_list']) &amp;&amp; $org_options['display_short_description_in_event_list'] == 'Y') { ?&gt;




            $jaer = jQuery.noConflict();


        &lt;a href=&quot;#&quot; onClick=&quot;$jaer(&#039;#date_picker_').slideDown('slow');$jaer(this).parent().slideUp('slow');return false;" class="register_date" id="register_date_"&gt;Register Now</a>
        &lt;div class=&quot;date_picker&quot; id=&quot;date_picker_"&gt;



                &lt;?php foreach ($events_group as $e) :
                    $num_attendees = get_number_of_attendees_reg_limit($e[&#039;event_id&#039;], &#039;num_attendees&#039;);//Get the number of attendees. Please visit http://eventespresso.com/forums/?p=247 for available parameters for the get_number_of_attendees_reg_limit() function.
                    echo &#039;';
                    if ($num_attendees &gt;= $e['reg_limit']) : 
                        echo '';
                    else :
                        echo '<a href="'.$e['registration_url'].'">';
                    endif;
                    if ($e['start_date'] != $e['end_date']) : 
                        echo event_date_display($e['start_date'], 'F j, Y').'–'.event_date_display($e['end_date'], 'F j, Y');
                    else : 
                        echo event_date_display($e['start_date'], 'l, F j, Y');
                    endif;
                    if ($num_attendees &gt;= $e['reg_limit']) : 
                        echo ' Sold Out <a href="'.get_option('siteurl').'/?page_id='.$e['event_page_id'].'&amp;regevent_action=register&amp;event_id='.$e['overflow_event_id'].'&amp;name_of_event='.stripslashes_deep($e['event_name']).'">'.__('(Join Waiting List)').'</a>';
                    else :
                        echo '</a>';
                    endif;
                    echo '';
                endforeach; ?&gt;













        = $events_group[0]['reg_limit']) : ?&gt;

            Sold Out &lt;a href=&quot;/?page_id=&amp;regevent_action=register&amp;event_id=&amp;name_of_event=" title=""&gt;</a> 



            &lt;a href=&quot;" title=""&gt;</a>


Dean

September 19, 2012 at 1:37 am

Hi

I haven’t tested your code out but it seems logical to add the time function here

 echo event_date_display($e['start_date'], 'F j, Y').'–'.event_date_display($e['end_date'], 'F j, Y');
                    else : 
                        echo event_date_display($e['start_date'], 'l, F j, Y');
echo " - " . event_espresso_get_time($event_id, $format = 'start_time');
                    endif;
                    if ($num_attendees &gt;= $e['reg_limit']) : 


emoria

September 19, 2012 at 7:21 pm

That worked for my recurring events but not my single events.


emoria

September 25, 2012 at 9:01 pm

For some reason its no longer working or my recurring events either. It only shows the time for the first entry the rest have the dash “-” but no time.


emoria

September 25, 2012 at 9:13 pm

Disregard. recurring events are ok just not single events.


Dean

September 26, 2012 at 2:59 am

Hello

TO clarify is this regarding the classes (i.e. Pre dance combo)? If so are the times all meant to be 09:15 am ?

I may need to have access to the site to have a look at the events.


emoria

October 8, 2012 at 6:36 pm

Hi Dean,

So this was displaying correct for recurring events but not the single events.

I just entered a bunch of new programs that are recurring and for some reason the time for all the events are showing 5:00AM on the event display page. They are correct on the event details page. Any idea why th


emoria

October 8, 2012 at 6:49 pm

I’m looking at events scheduled a couple weeks back when this was working and they are too affected. I’m commenting out this code till I can find a fix.


emoria

October 10, 2012 at 6:30 pm

I see you πŸ˜‰ need access?


Dean

October 11, 2012 at 4:50 am

Hi,

Sorry I thought you had put this to one side until you had found a fix.

I had another look at the code above, but I actually couldn’t get it to work properly.

The code I supplied for the time will work for single events, in fact I hadn’t tested it on recurring, but they are in fact multiple single events.


emoria

October 12, 2012 at 8:20 am

Any idea why it would have worked for a period of time and then stop?


Dean

October 15, 2012 at 5:06 am

HI

There should be no reason for it to stop working unless other code was changed/updated that interfered with it.

The support post ‘Add additional info’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Dean 7 years, 11 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!