Using events calendar outside of wordpress causes undefined property

Home Forums Calendar Products Events Calendar PRO Using events calendar outside of wordpress causes undefined property

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #794365
    simpleconnections
    Participant

    I was asked to create a new topic about this issue:
    <br /><br />
    If I create a non-wordpress page for my wordpress site and employ wordpress functionality using:
    require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
    get_header();

    On the resulting page at the top is Notice: Undefined property: WP_Query::$tribe_is_event_query pointing to events-calendar-pro line 896which readsif($wp_query->tribe_is_event_query ) {

    Is there any harm in changing this toif( isset($wp_query->tribe_is_event_query) && $wp_query->tribe_is_event_query ) {

    Also, do you know why this Notice is coming up only on pages where I’ve included wp-load.php and run the wordpress get_header function?

    #794606
    Brian
    Keymaster

    Thanks for providing this information it is defiantly a different case then I was expecting.

    From looking at the coding it looks like the global $wp_query is not set when loading WordPress “outside of WordPress”.

    I guess we expected to always load the Events Calendar in WordPress and did not think $wp_query would not be there is why we have not fixed it or added a check.

    I wonder if just setting global $wp_query and then $wp_query = “”; when you do your outside load of WordPress would fix the notice?

    #833341
    Brian
    Keymaster

    Since there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂

    Also, the latest version 3.8.1 should have taken care of most of these changes.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Using events calendar outside of wordpress causes undefined property’ is closed to new replies.