I’m running the latest version of both plugins—currently, I’m having to force each tribe_is*() function to use the global post ID anywhere outside the single-event template in that view. For instance, I run some conditional logic to show the title in my header.php file—now, I’m suddenly having to run echo get_the_title($wp_query->post->ID); just to display the title, and I’m having to put $wp_query->post->ID into literally every tribe function to make it work. What’s happening?
I’m not sure why you’re having a problem. For instance I can use the standard WordPress API function the_ID() in my header template – something like this, as an example, and it outputs the ID as expected:
<title> <?php the_ID() ?> </title>
And if I change that to:
<title> <?php the_title() ?> </title>
Then – certainly on single event pages – it output the post (event) title within the page’s title element (and note that I didn’t explicitly pass in the ID).
Does that clarify/help at all?
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Post ID not available globally?’ is closed to new replies.