WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
eo_get_the_start not returning anything (2 posts)

  1. watermelonkid
    Member
    Posted 9 months ago #

    Thanks for the amazing plugin.

    I have been able to use it with success for the most part, but in this particular case, eo_get_the_start is not returning anything. I've been able to use it fine in other queries on my site, but this query is a bit more complicated than some of the others, as it's nested and relying on the Advanced Custom Fields relationship field. I've tried both the 'in-loop' approach and out of the loop approach with eo_get_the_start.

    Here's the code. Anyone have any idea? Basically you have a query for a custom post, and then I'm doing a second query for the ACF relationship to the event and trying to pull that event data. It's pulling the title and the permalink fine from the event, just not the start date! Syntax issue?

    http://pastebin.com/TVSRPhX5

    Don't know why this wouldn't work...does it have to do with

    $date = eo_get_the_start('M Y',$post->post_id,null,$post->occurrence_id); echo $date;

    Pullling my hair out!

    http://wordpress.org/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 9 months ago #

    What is get_field('cf-rotator-rel') returning?

    If its an array of post objects then it should be $post->ID rather than $post->post_id. Just var_dump(get_field('cf-rotator-rel')) to see what its returning.

Reply

You must log in to post.

About this Plugin

About this Topic