Hi Jhanse,
I’m having trouble accessing your site (I think its a problem my end). Are you trying to include events alongside regular posts?
Thread Starter
jhanse
(@jhanse)
Yes, they do display in the loop but I had to manually specify the $post_ID as an argument for the eo functions (date, time, etc). So that I managed to correct, but the categories still don’t show.
Here’s a print screen:
http://i48.tinypic.com/2u7bted.png
Could you post the code you’ve added in your functions.php
? Or if its a lot, link to a bit bucket?
If the events are being displayed in the ‘main loop’, you shouldn’t need to specify the post ID. If you find you do, then you’ll also need to pass the post ID to display the event categories. If you are using eo_get_events()
then declaring each post (event) as global and then resetting this afterwards will also work.
Thread Starter
jhanse
(@jhanse)
function eo_event_loop($query){
if( $query->is_home() && $query->is_main_query() ){
$query->set('post_type', array('post','event',));
}
}
add_action('pre_get_posts','eo_event_loop');
This is the code in my functions.php
.
I too am having a similar problem. Since updating from 1.4.2 to 1.5.2, my events are no longer being output by the loop.
The code in my homepage is WP_Query(array('post_type'=>'event'))
, yet it outputs http://www.soulmastery.net/wordpress/. There used to be two boxes under Upcoming Events.
The code in taxonomy-event-category.php is the default if (have_posts())
call, yet it outputs http://www.soulmastery.net/wordpress/events/category/upcoming-events/. But notice how the events do appear in the sidebar widget on that page. The sidebar widget uses eo_get_events()
I believe. Is it no longer possible to use the default WP queries? If so I may just revert to the older version of this plugin and stop updating.
Any ideas? We need to launch this site tomorrow! Thanks!