• Resolved catinabox

    (@catinabox)


    $today = date('Ymd', strtotime("now")); 				
    $args = array(		
    'type'  => 'events',	
    'orderby' => 'name',	
    'order' => 'ASC',		
        'meta_query' => array(	
    		      array('key'=>'date',		
    		            'compare' => '>=',	
    			    'value' => $today,				)			 
    ),	       
    );	       	       
    
    $categories = get_categories($args);	       	       
    foreach ($categories as $category) {		        
    echo '<button data-filter=".'.$category->slug.'">'.$category->name.'</button>';	       }

    I’m building a jQuery filter for a list of events. For this i need a list of all category names used, but only for future events. I’m already using a meta query for the list of custom post type events, but the meta query does not work with get_categories.

    How can i list all categories used in future events?

Viewing 1 replies (of 1 total)
  • Hi there!

    ACF Support Team here. This forum is generally used by ACF users to help each other out. However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ?support form and we can look into it further.

    • This reply was modified 1 year, 9 months ago by ACF Support.
Viewing 1 replies (of 1 total)
  • The topic ‘get_categories with meta query’ is closed to new replies.