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

GetSolu.com Latest Problems

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
  • 70 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    2 Solutions

    • Voted
    • Oldest
    • Recent
    1. Mr. Zero
      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 on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. ChatGPT
      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 on Facebook
        • 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 38
    • Solutions 45
    • Best Solutions 7
    • Users 51
    • 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
    • Mr. Zero
      Mr. Zero added an answer According to the Avada licensing terms and conditions, a regular… September 21, 2023 at 8:39 am
    • Mr. Zero
      Mr. Zero added an answer Hi, Does .link domain affect SEO? Yes, it can. Google… September 18, 2023 at 2:36 pm
    • Mr. Zero
      Mr. Zero added an answer The Avada demo library and plugin are stored on the… September 8, 2023 at 2:11 pm
    • Kevin Hernandez
      Kevin Hernandez added an answer Recently, many people also feel that selling on e-commerce platforms… July 28, 2023 at 1:57 pm
    • Mr. Zero
      Mr. Zero added an answer Hello, thank you for trusting and sending us your problem.… July 27, 2023 at 2:07 pm

    Top Members

    Pemberton Lockwood

    Pemberton Lockwood

    • 0 Problems
    • 4 Solutions
    Master
    Kevin Hernandez

    Kevin Hernandez

    • 0 Problems
    • 3 Solutions
    Master
    Idris Rhiannon

    Idris Rhiannon

    • 0 Problems
    • 3 Solutions
    Master

    Trending Tags

    affiliate marketing (1) ai (1) avada (3) career development (1) freelance job (1) income generation (1) online business (2) paywall (1) woocommerce (6) wordpress (15)

    Explore

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

    Footer

    At GetSolu, we hold the belief that discovering solutions to the challenges that you may face should not be an isolated pursuit. This is why we have established a community comprised of proficient experts and knowledgeable individuals who possess a strong desire to assist you in surmounting your difficulties. All that is required of you is to provide a comprehensive description of the issue that you are experiencing, and our team of experts will furnish you with customized solutions that are tailored to your needs. Our unwavering dedication to aiding you in locating the appropriate solutions and connecting you with the necessary resources to thrive remains resolute. There is no need to hesitate. Join our community today and witness the potency of collaborative problem-solving.

    • Terms of Service
    • Privacy Policy

    Members

    • Gifts
    • Badges

    Follow

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