WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Issues with EM and YOAST (4 posts)

  1. gold84it
    Member
    Posted 4 months ago #

    Hello, I'm using Events Manager on my WordPress but after install WordPress SEO Yoast, and put custom metadata, it gives me this error when I call the events' page:
    Fatal error: Call to a member function get_bookings() on a non-object in /home/content/69/9542969/html/grancapodanno/wp-content/themes/grancapodanno/single-event.php on line 39

    On line 39 we have the following code:

    $tickets_count = count($EM_Event->get_bookings()->get_tickets()->tickets);

    What happen? How can I fix?

    Thank you

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

  2. angelo
    NetWebLogic Support
    Posted 4 months ago #

    did you add something like

    <?php
    	global $post;
    	$EM_Event = em_get_event($post->ID, 'post_id');
    ?>

    http://wordpress.org/support/topic/events-manager-eventslocation-pages-cant-get-sidebar?replies=21

  3. gold84it
    Member
    Posted 4 months ago #

    Great! It works!
    Thank you very much! You has been so kind!

  4. angelo
    NetWebLogic Support
    Posted 4 months ago #

    glad it worked.

Reply

You must log in to post.

About this Plugin

About this Topic