• Resolved Acts7

    (@acts7)


    I’m trying to find a way to grab the main events url.
    As the permalink can be changed in the admin, how can we call the events main page via functions.php?

    This used to be the method.
    dbem_get_events_page(justurl)

    I read in some posts that while depreciated, it would not be removed.
    But now searching the code – it has been.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    maybe in v5 we removed it, since that was depreciated in v2 i think. one sure way is the EM_URI constant

    Thread Starter Acts7

    (@acts7)

    you’re correct. Thanks for the fast reply.

    FOR THOSE SEARCHING:
    Here is the function:

    //PAGE URI OF EM
    $event_page_link = trailingslashit(get_permalink(get_option("dbem_events_page")));
    
    //To get this as part of a url:
    echo '<a href="'.$event_page_link.'">Calendar of Events</a>';
    
    //or use this
    <a href="<?php echo $event_page_link ?>">Calendar of Events</a>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Events Manager] dbem_get_events_page(justurl) no longer exists’ is closed to new replies.