Sign Up

Captcha Click on image to update the captcha.

Have an account? Sign In Now

Sign In

Discover the power of expert communities in searching for solutions.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question. Please subscribe to paid membership

Forgot Password?

Don't have account, Sign Up Here
Please subscribe to paid membership

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

GetSolu.com

GetSolu.com Logo GetSolu.com Logo

GetSolu.com Navigation

  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Home
  • About Us
  • Blog
  • Contact Us
Home/ Problems/Q 3529
Next
Need More Solution
Anonymous
  • 0
Anonymous
Asked: October 17, 20222022-10-17T08:08:57+00:00 2022-10-17T08:08:57+00:00In: Website Development

How to hide products that ware sold out in woocommerce?

  • 0

The products sold out and I will not continue to sell them. However, these products still show on my website by categories.

I don’t want to remove them because this is not good for SEO. I also try to create a new category, but this category appears in many places on my website.

I just want to hide them in selling product categories, and keep the links. Could you give me a solution for that?

woocommercewordpress
  • 2 2 Solutions
  • 45 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    2 Solutions

    • Voted
    • Oldest
    • Recent
    1. Mr. Zero
      2022-11-02T09:43:04+00:00Added an answer on November 2, 2022 at 9:43 am

      It’s easy to hide any product you don’t want to appear in the category where the product link is not affected.

      Open the products list on the admin page, take the mouse to a product you want to hide, and then click on “Quick Edit”. You will see the Visibility and select “Hidden”. Click update to save.

      • 0
      • Share
        Share
        • Share onFacebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. ChatGPT
      2023-02-01T15:04:32+00:00Added an answer on February 1, 2023 at 3:04 pm

      You can use a plugin or custom code to hide sold out products in WooCommerce. Here are the steps to achieve that:

      1. Use a plugin: There are several plugins available that allow you to hide sold out products in WooCommerce. For example, the “WooCommerce Out of Stock Visibility” plugin can help you achieve this. Simply install and activate the plugin, and it will automatically hide sold out products in your product categories.
      2. Custom code: If you are comfortable with coding, you can add the following code to your child theme’s functions.php file to hide sold out products:

      add_filter( ‘pre_get_posts’, ‘hide_out_of_stock_products’ );
      function hide_out_of_stock_products( $query ) {
      if ( $query->is_main_query() && ! is_admin() ) {
      $meta_query = $query->get( ‘meta_query’ );
      $meta_query[] = array(
      ‘key’ => ‘_stock_status’,
      ‘value’ => ‘outofstock’,
      ‘compare’ => ‘=’
      );
      $query->set( ‘meta_query’, $meta_query );
      }
      return $query;
      }

      This code will hide sold out products in your product categories, but the links to these products will still remain active and accessible.

      • 0
      • Share
        Share
        • Share onFacebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Add Your Problem

    Stats

    • Problems 16
    • Solutions 24
    • Best Solutions 5
    • Users 45
    • Popular
    • Solutions
    • Anonymous

      Create and print invoice from website used Woocommerce with WordPress

      • 2 Solutions
    • Anonymous

      Need show post by timeline on my blog website

      • 2 Solutions
    • Anonymous

      I want to find a software collage of photos with ...

      • 2 Solutions
    • Anonymous

      How to hide products that ware sold out in woocommerce?

      • 2 Solutions
    • Anonymous

      SMTP Error: Could not authenticate. Zoho mail

      • 2 Solutions
    • Kevin Hernandez
      Kevin Hernandez added an answer If you are looking for a WordPress theme that can… March 23, 2023 at 9:37 am
    • Amelia Harper
      Amelia Harper added an answer Thank you so much for taking the time to provide… March 17, 2023 at 9:46 am
    • Michael Chen
      Michael Chen added an answer I understand your concerns regarding the increasing use of AI… March 17, 2023 at 9:42 am
    • Kevin Hernandez
      Kevin Hernandez added an answer Hello there! I understand that you are looking for a… March 17, 2023 at 3:35 am
    • Pemberton Lockwood
      Pemberton Lockwood added an answer Yes, ReHub theme can provide a solution for your needs.… March 15, 2023 at 9:15 am

    Top Members

    Pemberton Lockwood

    Pemberton Lockwood

    • 0 Problems
    • 4 Solutions
    Master
    Idris Rhiannon

    Idris Rhiannon

    • 0 Problems
    • 3 Solutions
    Master
    Kevin Hernandez

    Kevin Hernandez

    • 0 Problems
    • 2 Solutions
    Master

    Trending Tags

    affiliate marketing ai freelance job income generation online monetization paywall profitable website startup woocommerce wordpress

    Explore

    • Home
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges

    Footer

    At GetSolu, we believe that finding solutions to your challenges shouldn't be a solitary pursuit. That's why we've built a community of experts and knowledgeable people who are passionate about helping you overcome your problems. All you need to do is describe your problem in as much detail as possible, and our experts will provide you with tailored solutions that work for you. We're committed to helping you find the right answers and connecting you with the support you need to thrive. So why wait? Join our community today and experience the power of collaborative problem-solving.

    • Terms of Service
    • Privacy Policy

    © 2023 Get Solu. All Rights Reserved
    With Love by Mr. Zero.