Listing uncategorised events and categorized events

Home Forums Calendar Products Events Calendar PRO Listing uncategorised events and categorized events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #940507
    Simon
    Participant

    I am trying to list all events that aren’t categorized and events that are in ‘main-events’ using the following arguments:

    Please can someone tell me what I am doing wrong as it only shows the categorized events

    $args = array(
    				"post_type" => 'tribe_events',
    				'tax_query' => array(
                         array(
                             'taxonomy' => 'tribe_events_cat',
                             'field' => 'slug',
                             'terms' => array('main-events', 'uncategorized')
    					     //'operator' => 'NOT IN'
                             )
    			        ),
    				"posts_per_page" => '2',
    				'orderby' => 'event_date',
    				'order' => 'ASC'
    			);
    
    #940563
    Josh
    Participant

    Hey Simon,

    Thanks for reaching out to us!

    On the surface, it looks like this should be working for you as expected. A couple of quick questions though:

    1. When implementing, are the other arguments for the query being applied and respected in the output such as the order, orderby, and posts_per_page?
    2. Do you have debugging turned on? Are there any errors being output on the page that you’re trying to implement this query?

    Hopefully answers to these questions will help us in determining what is happening with this query.

    Thanks!

    #983720
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Listing uncategorised events and categorized events’ is closed to new replies.