Support

Home Forums Event Espresso Premium My Events display options – show other columns in table

My Events display options – show other columns in table

Posted: June 20, 2013 at 10:46 am


Robert

June 20, 2013 at 10:46 am

Greetings!

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)?

Thanks!
Robert


Josh

  • Support Staff

June 20, 2013 at 1:29 pm

Hi Robert,

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.


Robert

June 20, 2013 at 4:36 pm

Josh,

Thanks!  I think that is working well.

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?

Thanks!
Robert


Josh

  • Support Staff

June 21, 2013 at 8:52 am

Hi Robert,

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? :

require_once( EVENT_ESPRESSO_MEMBERS_DIR . 'user_vars.php' );


Robert

June 21, 2013 at 9:26 am

Hi Josh,

That’s exactly what it needed!

Thanks!
Robert


Josh

  • Support Staff

June 21, 2013 at 9:44 am

You’re welcome.

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.

Event Espresso