We need finer control over which aspects of an event show on the “My Events” section (either within WP user’s admin screen – “My Events Management” or on a page using the [ESPRESSO_MY_EVENTS] shortcode). Here’s a link to what currently shows.
Specifically, we would like to remove the “Type” and “Ticket” columns and add other columns pulled from the additional questions added to the registration form (e.g. room number, registrant ID#, etc.).
I have found a few possible ways to start investigating how to do this but would appreciate some guidance:
Should I consider using the custom files, templates, or try something entirely different with WP (like the Shortcode Exec PHP plugin to create a custom SQL query)?
The my_events_page.php file in the espresso-members plugins is where this all happens. If you open up this file in a code editor, you’ll notice that it starts out as:
<?php
if (!function_exists('event_espresso_my_events')) {
function event_espresso_my_events(){
The if statement there is saying, if this function isn’t already defined somewhere else, run the following function. This is means you can copy the entire function over to the custom_functions.php file that’s included with the custom files add-on and you can customize it there. Your custom function will then load from the custom functions file.
Just one question – “user_vars.php” was required by that function to run. I tried changing the directory in the script but couldn’t seem to get it to work. I copied user_vars.php to the espresso uploads directory, and it works now. Do you see a problem with that solution or have a different suggestion?
Copying user_vars.php into /wp-content/uploads/espresso/ will work, but the downside is if there are any changes to user_vars.php in the plugin down the road the copy will need to also be updated. It’s best to load it from the plugin. Did you try this in your custom function? :
The support post ‘My Events display options – show other columns in table’ 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.