Skip to main content

With this filter you can adjust the query on the product-archive-page. For example, it’s possible to adjust the order with this filter. Basically any command, which a , can be processed.

The additional parameter $layout indicates which layout is used in the shortcode.

add_filter( 'at_set_product_archive_query', 'at_set_product_archive_order', 11, 2);
function at_set_product_archive_order( $query, $layout ) {
	$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 *

*
*