Filtering according to the locale ‘de_DE’

To achieve filtering according to the locale de_DE for the taxonomy terms displayed in the search box selector, you can use a similar approach as your archive title filter. add_filter(‘wp_dropdown_categories’, function( $output, $args ) { $locale = get_locale(); if (‘de_DE’ == $locale && $args[‘taxonomy’] == ‘tipologia’) { // Modify output for German locale and ‘tipologia’ … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)