• Resolved redkite

    (@redkite)


    I’m using this to display one random event on a template page:

    $query = new WP_Query( array(
    'post_type' => 'ai1ec_event',
    'posts_per_page' => '1',
    'orderby' => 'rand'
    )
    );

    This is working fine, but I need to be able to limit what’s displayed to the tag ‘sticky’ I added for a few events. I tried using events_tags-sticky, that doesn’t work. How would I query by event tag?

    https://wordpress.org/plugins/all-in-one-event-calendar/

The topic ‘display an event by tag’ is closed to new replies.