I have read a few forum responses to this but all seem to have different info.
I’d like to add one column “Instructor” which has ID Type “27”
I have the espresso-events-table-template.template.php file open and save in child theme.
To add a column to an HTML table you’ll need to add one table heading item and one new cell to the table row. This requires modifying your custom espresso-events-table-template.template.php file.
To add the table heading item, you’ll add something like this with the other <th> markup: <th class="th-group">Instructor</th>
Then, to get the data to display in the column cell, you’ll add this within the loop: $people = EEM_Person::instance()->get_people_for_event_and_type($event_id = $post->ID, $people_type_id = 27);
This will create an array of objects that you can take the information from and display in your custom table. Within the table row, you can add a new cell to display the Instructor name for each event.
For example:
The support post ‘Create Instructor Column Events Table Template/People Admin’ 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.