Support

Home Forums Event Espresso Premium Adding time to list

Adding time to list

Posted: June 14, 2021 at 8:30 am

Viewing 1 reply thread


Micha1202

June 14, 2021 at 8:30 am

Hi,

I’m using simple_list_table and I would like to have time in the same table.
It is important to me to have “actions” as shown and “when” in the same table.
I have read:
https://eventespresso.com/topic/modify-espresso_my_events-templatesimple_list_table/

and could not understand what should I do.

I have tried to add
“<th scope=”col” class=”espresso-my-events-datetime-range-th”>
<?php echo apply_filters(
‘FHEE__loop-espresso_my_events__datetime_range_table_header’,
esc_html__(‘When’, ‘event_espresso’),
$object_type,
$objects,
$template_slug,
$att_id
); ?>
</th>”
in loop-espresso_my_events-simple_list_table.template.php but of course without any sucess.

can you please assist?

Thanks,
Micha.


Tony

  • Support Staff

June 15, 2021 at 5:01 am

Hi there,

Are you copying the templates to a child theme to modify them? If not I recommend doing so, otherwise you’ll lose these changes whenever the plugin updates.

loop-espresso_my_events-simple_list_table.template.php controls the table output, so with the above change, you should see an additional ‘When’ table header.

Like this: https://monosnap.com/file/68AdA0i8itfvy2Q57X5eazpc1E0uHW

So with your change above, do you see that?

To add the additional column to the table you’ll need to copy \eea-wpuser-integration\templates\content-espresso_my_events-simple_list_table.template.php

Between line 31 and 32, you’ll add something like:

<td>
    <?php 
        $ticket = $registration->ticket();
        echo $ticket instanceof EE_Ticket ? $ticket->date_range() : ''; 
    ?>
</td>

That would add a date range in the same way it does for the ‘default’ table but you can output whatever you prefer in that section.

Viewing 1 reply thread

The support post ‘Adding time to list’ 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.

Event Espresso