Reply To: Include the Organiser in the event list shortcode

#23950

Hi Louise,

There are two ways of changing the output of the event list shortcode, discussed on this page: http://docs.wp-event-organiser.com/shortcodes/events-list/

Unfortunately there are no placeholders available for details of the organiser (I can look to add this in a future release if that will be helpful). However, rather than using placeholders, you can copy the template file into your theme and edit it there.

To get the ID of the event organiser:

$organiser_id = get_the_author_meta( 'ID' );

You can then use the default WordPress functions to retrieve data on that user ID.

$organiser = new WP_User( $organiser_id );
$organiser_name = $organiser->display_name;
//first name: $organiser->first_name;
//last name: $organiser->last_name;

with regards to retrieving an attribute from his membership profile, that will depend on where that data is stored. If it is stored as user meta then you can use get_user_meta()

Stephen Harris