Support » Plugin: Events Manager » [Plugin: Events Manager] "Create New" Button on main events page

  • Resolved Donald McIntyre

    (@donmcint)


    [Events Manager]

    Hello, how can I add the “Create New” button on the main events page. At this moment users can only create a new event by going to their page on BuddyPress:

    Profile > Events > My Events > Create New

    But I would like to put that button in the Events page so they have an easier access to create new events.

    Thx! Donald.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcus

    (@netweblogic)

    for BP it’s tricky because the urls are always in the form of /members/username/events/… where username is different for each user.

    you’d have to do this with PHP at the moment and generate the link that way.

    Yes, I see, I copied the code from where the other button is on the

    Profile > Events > My Events > Create New

    page which is located at the file: my-events.php, the code is:

    <?php if(current_user_can(‘edit_events’)): ?>edit/” class=”button add-new-h2″><?php _e(‘Add New’,’dbem’); ?><?php endif; ?>

    Tried pasting it on the main page PHP, but didnĀ“t work. I am not a developer so I guess I have to keep trying until I hit the correct PHP code format.

    If you could tell me how to write that I would be thankfull, my email is donald@dmcintyre.com

    Cheers and thank you!!

    Donald.

    The code is

    /** <?php if(current_user_can(‘edit_events’)): ?>edit/” class=”button add-new-h2″><?php _e(‘Add New’,’dbem’); ?><?php endif; ?> **/

    Plugin Author Marcus

    (@netweblogic)

    it’s a bit more complicated than that. You need to use the global $bp->logged_in_user… object, maybe someone can pitch in

    Donald any update on whether the code you posted was a viable solution to your issue?

    Also if it was where is the template file that you had to put it in.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Events Manager] "Create New" Button on main events page’ is closed to new replies.