• Resolved topitoconnectey

    (@topitoconnectey)


    Hi. I am trying to query featured events on my homepage. Here is what my query looks like. When I add the ‘tax-query’ argument, the query doesn’t return anything. If I remove it, I get all the events. What’s wrong with my query ?

    <?php
        $events = tribe_get_events( array(
    	'tax_query' => array(
    	    array(
    		'taxonomy' => 'tribe_events_cat',
    		'field' => 'slug',
    		'terms' => 'featured',
    		'operator' => 'IN'
    	    ),
    	),
    	'posts_per_page' => -1
        ));
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter topitoconnectey

    (@topitoconnectey)

    Nevermind. I replaced

    'tax_query' => array(
        array(
    	'taxonomy' => 'tribe_events_cat',
    	'field' => 'slug',
    	'terms' => 'featured',
    	'operator' => 'IN'
        ),
    ),

    by

    'featured' => true

    By I get one of the event as duplicate, why ?

    Barry

    (@barryhughes-1)

    Sorry for the delay! Do you still need help with this and can you link to a live example where a duplicate results from your code?

    We’ll take a look if we can but I will also note that when it comes to custom development tasks like this one we’re pretty limited in terms of how much support we can offer, especially here in the free support forum ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query featured events’ is closed to new replies.