WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Event data not showing up in the loop (6 posts)

  1. jhanse
    Member
    Posted 2 years ago #

    Hi!

    I have fed my events into the loop as per another post on here (through functions.php) and while they show up and the conditionals do seem to work (I can get an 'event' ticker next to the title to display), they don't seem to output the relevant data.

    This is the site:
    (it's in Slovenian but you'll get the picture, the first post is an event)
    http://test3.medicinec.si/

    As you can see it's empty after This event will take place and the category isn't displayed either. In contrast, the single event page shows all the relevant data!

    Thanks for your help.

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

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    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?

  3. jhanse
    Member
    Posted 2 years ago #

    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

  4. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. jhanse
    Member
    Posted 2 years ago #

    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.

  6. nothin7
    Member
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic