Home Forums Basel support forum Default product listing sorting

Default product listing sorting

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #29355

    Oscar
    Participant

    Hi there
    On shop page on the product listing on top right I disabled the sorting, so it sorts as default.
    But I dont know it does sorting according to what default?
    Date? or price or what?
    since my web site no purchase catalogue site, I prefer that it does sorting according to the date. First older published products then newer. My question is:
    1-As default what is the sorting?
    2-If it does according to published date, and older first on top then newer ones, its ok by me, if not how can I do that? (I disabled the user to select sorting option)
    thank you

    #29367

    Artem Temos
    Keymaster

    Hello,

    You can find all available options for products order in WooCommerce -> Settings -> Products -> Display.

    Regards

    #29375

    Oscar
    Participant

    Thank you for your answer even on Sunday 🙂
    I did as you said its ok.
    1-But I selected “updated” so it do sorting according to product’s update date so it shows latest updates first. But I need according to date published not updated, and date descending I need. So I can list all my products the first ones I published on top then the rest.
    2-I also did settings so shop page shows categories, and sub categories on the same settings (display) page, but in a row it shows 4 categories (category images), but I want it shows only 2 in a row. And I want to keep shop settings that for products listings it shows 4 products in a row. So how?
    THANX

    #29401

    Artem Temos
    Keymaster

    Hi,

    1. Try to use “Sort by most recent” option https://gyazo.com/1a2dbcc21167b8537ed75625747cfac4

    2. Sorry, but it is not possible since there is one and the same loop for both categories and products.

    Regards

    #29403

    Oscar
    Participant

    1- Hi the link ou sent opened nothing just gray blank page

    2-Is it possible with css?
    thanx

    #29404

    Artem Temos
    Keymaster

    1. Here is a screenshot

    2. Try this CSS

    div.category-grid-item {
    	width: 50%;
    }
    #29407

    Oscar
    Participant

    1-Yes I know I already did it like that on woocommerce display, but it sorts only “update” not published date. They are different. For example you publish a product its date stays the same, but each time update that product, its update date changes so that causes changes in sorting order on the listing. But I found this solution on web do you think this code would work on functions.php >

    add_filter('woocommerce_get_catalog_ordering_args', 'am_woocommerce_catalog_orderby');
    function am_woocommerce_catalog_orderby( $args ) {
        $args['orderby'] = 'date';
        $args['order'] = 'asc'; 
        return $args;
    }
    

    2- Thanx that css I put even with !important, didnt work in child-theme style.css
    But it worked when I put in wp-admin theme options custom css section. Why do you think (by the way the other things I put on child theme style.css works
    div.category-grid-item{width:50%!important;}
    Anyway it works now as 50% thanx

    #29411

    Artem Temos
    Keymaster

    1. Sorry, but we didn’t test this code so don’t know about any issues with it.

    2. You can remove this code from the Custom CSS in Theme Settings and leave in the child theme only.

    #29470

    Oscar
    Participant

    With some strange reason when I remove the code from child/style doesnt work, only on theme option custom css works.

    By the way can I ask, at the moment when I click facebook share button under a product detail it shares on facebook but it doesnt show product’s thumb.
    When I click whatsap share icon it shares on whatsap with site logo not product thumb.
    I want both to show whatever the product’s thumb when sharing.
    How?
    THANX

    #29481

    Artem Temos
    Keymaster

    So do you have it on the child theme only at the moment so we can check it?

    Here is an article that should help you to fix facebook share images issue http://www.wpbeginner.com/wp-tutorials/how-to-fix-facebook-incorrect-thumbnail-issue-in-wordpress/

    #29491

    Oscar
    Participant

    Shall I install this plugin? is it ok with your theme? I guess that solves the facebook thumb image problem??
    WordPress SEO by Yoast

    #29499

    Artem Temos
    Keymaster

    Yes, this plugin is compatible with our theme.

    regards

Viewing 12 posts - 1 through 12 (of 12 total)