• Resolved singhmc

    (@singhmc)


    Hello,

    Is there an available hook or something I need to select to show WooCommerce products with visibility “hidden” in XML sitemap?
    I have a plugin (Show single Variation) which creates product variations which are hidden, that’s perfect like that. But we want that parent product, which is hidden in our store, to be indexed by google, because the parent product page still works.

    Please advise, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support devnihil

    (@devnihil)

    @singhmc What dictates whether a page/post or product is shown in it’s corresponding sitemap can be set both on a global level (meaning the default setting for all pages/post that are part of that content type or taxonomy) and also be set on an individual level from the Yoast meta box on the ‘Edit’ screen for that page/post/product.

    In both ways this setting is changed by modifying the ‘Show in search results’ setting to either ‘Yes’ (this sets the robots meta tag to a value of index, and means the page/post/product will have it’s URL included in the sitemap) or ‘No’ (this sets the robots meta tag to a value of noindex, and means the page/post/product will NOT have it’s URL included in the sitemap).

    We would recommend checking to make sure the robots meta tag is NOT set to noindex for the hidden product in Yoast SEO, and you can change this setting by performing the following actions to change setting on an individual page/post/product:

      ? Go to the Edit screen for the product
      ? Scroll down to the Yoast metabox
      ? Click on the ‘Advanced’ area
      ? For ‘Allow search engines to show this Page in search results?’ make sure this is set to ‘Yes’
      * Note (setting this value to Yes will set meta robots to index and include it’s URL in the sitemap)

    In addition, you can set pages/posts, products, and taxonomies to be indexed and included in the sitemap as the default for their entire type globally by performing the following actions:

      ? In WordPress go to Yoast SEO>Search Appearance>Content Types (or Taxonomies if you are trying to affect a change to a Taxonomy type)
      ? For the corresponding content type set ‘Show in search results’ to ‘Yes’
      ? Click ‘Save Changes’

    We also have additional information on this topic in the How do I noindex URLs? and the How do I customize the sitemap index? articles.

    Thread Starter singhmc

    (@singhmc)

    Hey Devnihil

    I double-checked the settings 6 they are set as correctly as you mentioned. And the product is still not showing in the sitemap.
    I think I need something like this:
    https://www.seopress.org/support/hooks/include-woocommerce-hidden-products-to-the-xml-sitemap/

    Best regards

    Hey @singhmc,

    Thank you for your reply.

    I’m afraid to say that we don’t have a workaround or solution for you to make the parent product which has a custom visibility status added to the sitemap.

    I’d recommend checking with the developer of the “Show single Variation” plugin to check whether they can integrate with our plugin and make this happen. You can refer them to our developer documentation here: https://developer.yoast.com/features/xml-sitemaps/api/

    • This reply was modified 2 years, 4 months ago by Jeroen Rotty. Reason: fix typo
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Include WooCommerce hidden products to the XML sitemap’ is closed to new replies.