Hide category product count and sort dropdown

This topic has 4 replies, 2 voices, and was last updated 7 years, 11 months ago ago by Jack Richardson

  • Avatar: walkerk2@mac.com
    walkerk2@mac.com
    Participant
    May 4, 2016 at 22:31

    Hi, how can I hide the category product count and sort dropdown? Please see what I’m talking about at
    http://www.jefferson-rentals.com/IMAGES/TEMP/remove-sort.jpg and http://www.jefferson-rentals.com/IMAGES/TEMP/remove-count.jpg ?

    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    May 5, 2016 at 09:40

    Hello.

    To hide sort dropdown use this css code in custom.css:

    .woocommerce-ordering {
        display: none;
    }

    To create custom.css you need rename default.custom.css to custom.css in wp-content/themes/xmarket directory via FTP and enable it in XMarket – General, tick “Enable Custom CSS file”.

    As for the category product count remove or comment the following code in wp-content/themes/xmarket/woocommerce/content-product_cat.php:

    <?php if ( $category->count > 0 ) : ?>
    <mark class="count">(<?php echo $category->count; ?>)</mark>
    <?php endif; ?>

    Best regards,
    Jack Richardson.

    Avatar: walkerk2@mac.com
    walkerk2@mac.com
    Participant
    May 5, 2016 at 18:10

    Thanks. I thought there was a way to run off the product count through the admin panel options. I had it turned off earlier but couldn’t find it again. I looked under both WOOCOMMERCE and Xmarket settings. Do you know if I can turn it off without adjusting the code?

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    May 5, 2016 at 19:28

    Hello,

    Sorry, but you have to edit theme files to remove product count.

    Best regards,
    Jack Richardson.

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.