Skip to main content

With this filter you can adjust the query on a term-page (entry of a taxonomy). Basically any command, which a WP-query is supporting, can be processed.

add_filter('at_set_product_taxonomy_query', 'at_set_product_taxonomy_orderby', 11, 3);
function at_set_product_taxonomy_orderby($args, $taxonomy, $term_id) {
	if($taxonomy['slug'] == 'marke') {
		$args['orderby'] = 'rand';
	}
	
	return $args;
}

Was this article helpful?

1 Star2 Stars3 Stars4 Stars5 Stars
(No Ratings Yet)

Keine Kommentare vorhanden


You have a question or an opinion about this post? Share it with us!

Your email address will not be published. Required fields are marked *

*
*