Support

Home Forums Event Espresso Premium Table Template Add-On Show Custom Field Data

Table Template Add-On Show Custom Field Data

Posted: March 16, 2016 at 4:26 pm


katearpin

March 16, 2016 at 4:26 pm

I have added the Table Template add-on to my website and have followed the customization directions to remove the venue column and the datetimes column.

My events have custom field data that says the days of the week and times my classes occur. Is there away to add this data as two new columns in the table template?

http://ennis-ece.org/all-fall-2015-classes/


Josh

  • Support Staff

March 16, 2016 at 4:36 pm

Hi Kate,

Absolutely. May I ask, are the custom fields set up with a plugin like Advanced Custom Fields?


katearpin

March 17, 2016 at 10:33 am

Yes, they are–with Advanced Custom Fields. 🙂


Josh

  • Support Staff

March 17, 2016 at 4:40 pm

Hi Kate,

The Advanced Custom Fields plugin makes things a little easier because you can use the get_field() function. So for example in your template you add the rows to the column headings like this:

<th class="th-group">Custom Field day</th>
<th class="th-group">Custom Field times</th>

Then later in the template, inside the loop, you add something like this:

<td class="cf"><?php echo get_field('custom_event_field_day_of_week', $post->ID); ?></td>
<td class="cf"><?php echo get_field('custom_event_field_times', $post->ID); ?></td>

The support post ‘Table Template Add-On Show Custom Field Data’ 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