Filter WooCommerce archive pages by an additional category
you need to add your topic to query_vars. function so306156_add_query_vars_filter($vars) { $vars[] = “topic”; return $vars; } add_filter(‘query_vars’, ‘so306156_add_query_vars_filter’); and then, in pre_get_posts, you check for that var and act accordingly: function so306156_manipulate_main_query($wp_query) { if (function_exists(‘is_woocommerce’) && !is_admin()) : if ($wp_query->is_main_query() && is_woocommerce()) { if (isset($wp_query->query_vars[‘topic’])) { $tax_query = $query->get(‘tax_query’); $tax_query[] = [ ‘taxonomy’ => … Read more