Support

Home Forums Event Espresso Premium Events of a specific user

Events of a specific user

Posted: August 20, 2018 at 8:29 am


WaysIT

August 20, 2018 at 8:29 am

Hello,
We have events with different organizers (level # 2 s2Member). We want an organizer to only be able to visualize their events, in a ‘My events’ page and not those of another organizer. Is this possible? Is there any shortcode that we can use, for example [ESPRESSO_EVENTS id_user = “x”]?
Regards,
Teresa


Josh

  • Support Staff

August 20, 2018 at 3:08 pm

Hi Teresa,

While there are no shortcodes for this, what you can do is use the WordPress author archive. WordPress doesn’t include custom post types like events in the author archives by default, but you can add them. You add this code to your site:

function ee_custom_post_author_archive($query) {
    if ($query->is_author)
        $query->set( 'post_type', array('espresso_events', 'post') );
    remove_action( 'pre_get_posts', 'ee_custom_post_author_archive' );
}
add_action('pre_get_posts', 'ee_custom_post_author_archive');

You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file.

Then, you go to yoursite.com/author/author_name and you’ll see a list of their upcoming events there.

Also, if they use the Event Espresso > Events list table in the admin: If the organizer is the author of the event, and their user role does not have the ee_read_others_events capability, then they’ll only see a list of their events there.


WaysIT

August 21, 2018 at 12:45 am

Hi Josh,
Thanks for your reply. I will try to adapt the capabilities of the role to see if I get what I want. The code you send me works perfectly.
Thanks again.
Best regards,
Teresa


WaysIT

August 21, 2018 at 4:01 am

Hi Josh,
What I’m trying to get is something like a participant’s registration list, that is, the list of events that I am an organizer of. Like in the
image
I want to see the list of enrollees and be able to download it.
Regards,
Teresa


WaysIT

August 21, 2018 at 4:08 am

The correct image’s url https://inscribeme.es/participante.png


Tony

  • Support Staff

August 21, 2018 at 4:09 am

Hi Teresa,

That link appears to be dead, however, I can tell you we don’t have any form of ‘front-end event manager’ for EE4 which it sounds like you are looking for.

One option that is available if the user as the event author is to create a role on that the site that only gives access to EE in the admin and also only shows the current users events (the events in which the user is set as the author).

Would that work for you?

The support post ‘Events of a specific user’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 1 year, 2 months ago ago

Topic Tags

Tagged: , , ,

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!