Community Events List show all entries to Admin

Home Forums Calendar Products Community Events Community Events List show all entries to Admin

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1144927
    Micah Kritzman
    Participant

    I have added a link to the Front End Events List.

    When I log in, I only see the events that I created. This is great for my users however I want the Admin User to see everyones events from the front end.

    Is there a way to accomplish this?

    Thanks,

    Micah

    #1144963
    George
    Participant

    Hey @Micah,

    Thanks for reaching out.

    At this time, the only for admins to see all submitted events—regardless of author—is to log into the site’s wp-admin. There is not currently a way to do this on the front end.

    You might have success by adding the following code snippet to your theme’s functions.php file:


    function tribe_ce_show_all_in_my_events_list_if_admin( $args ) {

    if ( empty( $args ) || ! is_array( $args ) ) {
    return $args;
    }

    if ( current_user_can( 'administrator' ) ) {
    $args['author'] = 0;
    }

    return $args;
    }

    add_action( 'tribe_ce_my_events_query', 'tribe_ce_show_all_in_my_events_list_if_admin' );

    ☝️ Try this out and let us know if it helps!

    — George

    #1148639
    Micah Kritzman
    Participant

    Awesome, that did exactly what I needed!

    Thanks for the help.

    Micah

    #1148708
    George
    Participant

    Glad to hear it! 😀

    Open a new thread any time if other questions or issues ever arise.

    Cheers,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Community Events List show all entries to Admin’ is closed to new replies.