Support

Home Forums Event Espresso Premium Events Table View Template – add a column for the day of the week

Events Table View Template – add a column for the day of the week

Posted: March 31, 2015 at 10:26 am

Viewing 6 reply threads


Oguzhan Altun

March 31, 2015 at 10:26 am

Hello,
Is it possible to add the day of the week as a separate column to the events view template?
Thanks in advance,


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 2:01 pm

Hi, try this tutorial:

https://gist.github.com/lorenzocaum/ac217033f12232404cce#comment-1424479

You likely already have templates in place so first read through the steps, then go to step 6.


Lorenzo


Oguzhan Altun

March 31, 2015 at 2:32 pm

Hi Lorenzo,

Great, added the day of the week with success:) But now the date seems weird, with the Date and the time in one column, and day of the week in the other: http://www.genevaphotoclub.com/dates-prices/

Is there anyway I could separate the time as well into another column?

I also wanted to check with you if it’s possible to include the price as well, as a separate column?

Thank you so much in advance.


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 2:51 pm

Try this tutorial instead:

https://gist.github.com/lorenzocaum/9bab331ac6026fae9003


Lorenzo


Oguzhan Altun

March 31, 2015 at 4:06 pm

Hello,
Yes it works, I have the weekdays, thanks:)

Is it also possible to separate the start times from the date and add them as a separate column? Here is the code I have at the moment for the date, that shows date & time:
<td class=”start_date event-<?php echo $post->ID; ?>” data-value=”<?php echo strtotime( $startdat ); ?>”><?php echo $startdat; ?></td>


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 4:44 pm

Hi, this could work for removing the times:

https://gist.github.com/lorenzocaum/ac217033f12232404cce#comment-1349052

However, you would still need to create an additional column for the time itself.

You can create another column (new column) by following these steps:

https://gist.github.com/lorenzocaum/9bab331ac6026fae9003

Change the column name from Day of Week to Time or something equivalent.

In the last step, change this:

espresso_event_date_range( 'l', ' ', ' ', ' ', $event->ID()

to this:

espresso_event_date_range( 'G:i', ' ', ' ', ' ', $event->ID()


Lorenzo


Oguzhan Altun

March 31, 2015 at 4:53 pm

Perfect, this worked! Thank you very much 🙂

Viewing 6 reply threads

The support post ‘Events Table View Template – add a column for the day of the week’ 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