WP_Query to display number of custom post type filtered (order by) taxonomy

You could try running a custom query for each: $args_1 = array( ‘post_type’ => ‘incidents’, ‘post_status’ => ‘published’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘store’, ‘field’ => ‘name’, ‘terms’ => ‘store_1’, ), ), ); $count_1 = count( get_posts( $args_1 ) ); echo ‘Store 1: ‘ . $count_1 . ‘ posts’;

Some posts not displaying by taxonomy term

The problem is with your tax_query — the field (database column name) does not match the terms (database column values): $args = array( … ‘tax_query’ => array( array( ‘taxonomy’ => ‘state’, ‘field’ => ‘name’, // <- this should be set to ‘slug’ ‘terms’ => $state_slug, // because you provided term slug ), ), ); I.e. … Read more

Change the term based on the value of a $variable using wp_update_post in submitting a form

Your problem is this line: if (isset($_POST[‘call_16’]) == ‘No’ ) { isset() returns true or false based on whether the ‘call_16′ item exists in the $_POST array. It doesn’t return the value. So isset($_POST[‘call_16’]) is true, not ‘No’. If you want to check if it’s set and that it has a specific value (which you … Read more

WordPress – Form does not filter the results of taxonomies

Try below code for search using date and category. $_name = $_GET[‘date-picker-example’]; $categoria = $_GET[‘categoria_evento’]; $today = date(‘Ymd’); // Start the Query $v_args = array( ‘post_type’ => array(‘eventi-suite’), // your CPT ‘posts_per_page’ => -1, ‘meta_value’ => $_name, // looks into everything with the keyword from your ‘name field’ ‘order’ => ‘ASC’, ‘orderby’ => ‘metakey_AMC_data’, ‘meta_query’ … Read more

Multiple Custom Taxonomy Rewrite

You must use separate base for both custom taxonomies. For example: default URL: /chalets/ location term URL: /chalets/location/%location% type term URL: /chalets/type/%type% Rewrite rules need to identify the requested custom taxonomy via URL. So, a base URL identifier is required in your case.