Custom post type not registering
-
When I go to an event, it’s registering as a “page” post type, and the global object $post is empty. ( At the bottom of this entry I show some debug code and what it displays )
Although the event displays fine, getting custom metadata and related info doesn’t work given it’s not registering as an event. Before I updated the plugin from 3.9.x, it was registering as an “event” post type and the post object was filled.Info:
The Events Calendar PRO v 3.12.2
The Events Calendar v 3.12.3
WP version 4.2Here’s the page: http://ethoschicago.staging.wpengine.com/event/sunday-service/2015-10-25/
Add ?debug for debug info: http://ethoschicago.staging.wpengine.com/event/sunday-service/2015-10-25/?debugHere’s the code that’s displaying that info:
echo var_dump(get_post_type($post->ID)); // - page echo var_dump(tribe_is_event($post->ID)); // - false echo var_dump($post->ID); // - 0 echo var_dump(get_post_type()); // page echo var_dump(get_post_type( $post->ID )); // page echo var_dump($post); // Post object, emptyAny ideas?
Thanks a bunch!
David
The topic ‘Custom post type not registering’ is closed to new replies.