Forum Replies Created
-
AuthorPosts
-
The modified rand didn’t help.
I am guessing it is disabled by my hosting provider. Thanks for the help though, you can consider this closed now.
Right – that was some other code which was supposed to do that. However this doesn’t work for me either, the sorting stays at what I choose in the customizer.
Adding the ‘random’=>’rand’, to this function
"name" => __("Sorting Options", 'avia_framework' ), "desc" => __("Here you can choose how to sort the products. Default setting can be set at Woocommerce -> Setting "id" => "sort", "type" => "select", "std" => "dropdown", "no_first"=>true, "subtype" => array( __('Let user pick by displaying a dropdown with sort options (default value is defined at Defau __('Use defaut (defined at Woocommerce -> Settings -> Default product __('Sort alphabetically', 'avia_framework' ) =>'title', __('Sort by most recent', 'avia_framework' ) =>'date', __('Sort by price', 'avia_framework' ) =>'price', 'random'=>'rand', __('Sort by popularity', 'avia_framework' ) =>'popularity')),
in enfold/config-templatebuilder/avia-shortcodes/product_grid.php was supposed to give me random as a option, which however doesn’t work either.
Are there other ways to show the products by random ?
-
This reply was modified 6 years, 3 months ago by
saabendtsen.
Alright I found it thanks.
However adding the code from this thread https://kriesi.at/support/topic/random-order-for-product-grid/ does not allow me to choose random sorting. How can I get this ?
The code that I tried adding is this below here, which i added to functions.php in my child theme.
add_filter('avia_product_slide_query', 'avia_product_slide_query_mod', 10, 2); function avia_product_slide_query_mod($params, $grid, $test) { $params['orderby'] = 'rand'; return $params; }
-
This reply was modified 6 years, 3 months ago by
saabendtsen.
-
This reply was modified 6 years, 3 months ago by
-
AuthorPosts