Bulk import in custom taxonomy

The Function: Add new terms and term meta values from .csv file below should help. 1. Requirements The .csv file must have a header row. The function below is defined to receive a .csv with a minimum of three columns to fill these WP_Term fields: name, slug, and description. However, the suggested function updates and … Read more

Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2

I think, you can try this type of code. $args = array( ‘post_type’ => ‘product’, ‘meta_key’ => ‘sorting_weight’, ‘orderby’ => ‘meta_value_num’, ‘posts_per_page’ => – 1, ‘order’ => ‘DESC’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘term_id’, ‘terms’ => 81, // category 1 ), array( ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘term_id’, … Read more