Support » Plugin: The Events Calendar » tribe_is_event() failing

  • Resolved motorfirebox


    Hi, I’m having an issue integrating Yoast SEO with The Events Calendar. I’ve been piecing together a solution based on several previous threads, and it’s going well, with a single exception: every time I try to call tribe_is_event(), it fails and I get a PHP error: “Trying to get property of non-object in …/the-events-calendar/lib/the-events-calendar.class.php on line 2510”. That line is pretty innocuous: “$postID = $post->ID”.

    I’m basing my function on the example conditional here:

    I’m using v2.0.10 with WP 3.4.2. I’m using a Thematic child theme, but this issue occurs even when I switch to Twenty Eleven. Any pointers on where to start looking would be greatly appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Rob La Gatta


    Hi there motorfirebox. Thanks for the note here, and sorry that you’re having problems. We recently had an issue related to this specifically, which was supposed to be fixed as of 2.0.10 (and was reported as such by other users facing a similar issue). I’ve asked the primary dev who wrote that code to take a look here and see if there is something we overlooked or if your install has something specific. Stay tuned and thanks for your patience so far.

    I greatly appreciate you guys looking into it. Just to clarify, disabling Yoast SEO does resolve the PHP errors, but unfortunately that’s not a good permanent solution for us. Fingers crossed!

    Plugin Contributor Daniel Dvorkin


    Hi motorfirebox, I tried to replicate this issue and I’m not getting that notice. Can you explain a little bit better please how to replicate this? For instance, in what page are you getting that notice?


    The error occurs in /events, /events/upcoming, /events/month (and past/previous months), but not on specific event pages. On pages with that notice, the title doesn’t appear correctly (if that wasn’t clear).

    The function I’m using is posted at Here’s my plugins list:

    Attachments v1.6.2.1
    Contact Form 7 v3.3.1
    Custom Post Type Shortcode v1.4.3
    FV Top Level Categories v1.4
    Google XML Sitemaps v3.2.8
    Menu Manager v1.0.4
    Raw HTML v1.4.8
    Really Simple CAPTCHA v1.5
    The Events Calendar v2.0.10
    Widget Classes v0.1
    Widget Data – Setting Import/Export Plugin v0.4
    WordPress SEO v1.3.1.1
    WP-Mail-SMTP v0.9.1
    WP-Migrate-DB v0.4.2

    As I said, I’m using a custom Thematic child theme, but I pasted the function into the functions.php of Twenty Ten and I get the same result. I’m doing this on a testbed installation, so if it would help, I can give you temp access to the site to see what’s going on. Thanks again.

    Plugin Contributor Daniel Dvorkin


    hey motorfirebox, I’ll need that access, because I’m replicating exactly your code, and I’m not getting any notice. In fact the title is getting set:

    You can drop me an email at

    I’m not sure how this worked, I’m not sure why this worked, but it worked: I added an Events page through the WordPress interface, and suddenly the correct titles are showing up. I’m still getting the notice regarding 2510 but those can be hidden.

    Plugin Contributor Daniel Dvorkin


    Excellent! So are we all set for now?

    Yessir, it’s up and running. Thanks again for looking into it.

    Plugin Author Rob La Gatta


    Thanks for confirming that you’re all set here, motorfirebox. Going to mark this one RESOLVED accordingly. Let us know what else you need down the road!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘tribe_is_event() failing’ is closed to new replies.