I’m trying to change the default sorting order for products on my shop page. Specifically I want the products in a custom order by default.
I’ve tried every solution I can find in “How To” guides, but none of them seem to work, or even be relevant to this theme. The shop page remains sorted by popularity (even though I have zero orders so far. So really it’s just sorting by most recently added.)
Most guides on the internet say to change the default sorting option in the Product Catalog setting of the Customize menu. But no such option exists for this theme.
I’ve tried clicking “Sorting” on the All Products page, and dragging and dropping the products into a custom order. But the Shop Page is still sorting by default, despite the new order in wordpress.
I’ve tried changing Menu Order values for any given product to 1 or even -1, but it has no effect.
Given that the products are technically sorted by most recently added right now, I even tried changing the dates the products were added on the product posts, but it had no effect.
How can I change the default sorting option on the shop page to a custom order?
Thanks
]]>Every time I login to admin and navigate to plugin settings I get “Your Google API Key is not valid for this request and permission is denied.” message. Billing on Goolge is active and I am restricting API key access to the given IP address in the plugin. Also Places API is enabled.
Right now I am manually fetching new reviews.
Also, one more thing I observed is that the reviews are not sorted according to date even though when correct sorting option (Date Descending New->Old) is used.
]]>I’m trying to create a custom WooCommerce theme. My problem is with the sorting dropdown on product archive template. The dropdown is not working but when switch to a default theme the dropdown is working properly.
I have duplicate the archive-product.php and insert it under the path “myTheme->woocommerce->archive-product.php”
What should I do? Is there a function that I must include inside the functions.php?
Note: I have already included the bellow part
// Woocommerce
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
Thanks in advance
is there a way how to change the Default product sorting setting from Custom Ordering + Name to Custom Ordering + Date (i.e. Most recent)?
Thank you a lot
]]>Cant has option to remove sorting products from pages etc
]]>function hiddenemail_default_order( $query ){
if( $query->get('post_type')=='hiddenemail' ){
if( $query->get('orderby') == '' ) {
$query->set('orderby','title');
}
if( $query->get('orderby') == 'title' && $query->get('order') == '' ) {
$query->set('order','asc');
}
}
}
add_action('pre_get_posts','hiddenemail_default_order');
That seems to work well, as items are now sorted alphabetically by the title by default. however if I decide to change the sorting order (by clicking on the arrow next to the column heading), the first click still sorts in ascending order. The second click sorts in descending order.
When I look at the URL that the sorting arrow is pointing to, I see the following:
Initial view:
edit.php?post_type=hiddenemail&orderby=title&order=asc
After first click:
edit.php?post_type=hiddenemail&orderby=title&order=desc
After second click:
edit.php?post_type=hiddenemail&orderby=title&order=asc
What I need is for the initial view URL to have order=desc (so that it actually changes from the default sort order).
]]>