• Resolved testica

    (@testica)


    Hello,

    1. I have a store in Woocommerce where the product page should not be indexed. Is it possible to apply “noindex, nofollow” for all products automatically?

    I tried to put the code found here https://github.com/sybrew/the-seo-framework/issues/118#issuecomment-298161178 in functions.php but it doesn’t seem to work for me. I think the situation is a little different.

    2. Can I use metas template variables? In Yoast I used %%currentyear%%, something similar in The SEO Framework?

    Many thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter testica

    (@testica)

    3. I see that WooCommerce product tags have “noindex, noydir”. I want to delete these variables to index product tags. I know, it sounds weird, but I really want that. ??

    Thread Starter testica

    (@testica)

    Last question. ??

    4. How do I include product tags in sitemap.xml?

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @testica,

    My apologies for the delay in replying. Custom coding issues take a little longer to process.

    To answers your questions in sequential order:

    1.
    Excluding product pages from the SERP automatically is possible, but that requires using WordPress filters. The filter you’ve highlighted is for excluding product attribute terms, not products. This explains why it doesn’t work for you out of the box.

    This adjusted version should work:

    add_filter( 'the_seo_framework_robots_meta_array', 'my_robots_adjustments', 10, 1 );
    function my_robots_adjustments( $robots = array() ) {
    
    	if ( ! function_exists( 'is_product' ) )
    		return $robots;
    
    	if ( is_product() ) {
    		// Keys match the value. Legacy code.
    		$robots['noindex'] = 'noindex';
    		$robots['nofollow'] = 'nofollow';
    	}
    
    	return $robots;
    }

    However, I recommend simply checking the related option checkboxes to have a consistent experience.

    2.
    Adding tags/templates in titles isn’t possible; but, it’s planned:
    https://github.com/sybrew/the-seo-framework/issues/140

    3.
    To remove the noydir (sitewide) and noindex (tags) output, go to this view and adjust the options accordingly:
    SEO Settings Page -> Robots Meta Settings -> General/Indexing

    Note that noindex is applied automatically when the query returns empty. So, some tags might have this if nothing is tagged to it.

    4.
    Terms and taxonomies are not recieving support for sitemaps.
    The plugin’s FAQ explains why under heading “The sitemap doesn’t contain categories, images, news, etc. is this OK?”:

    This is not an issue. Search Engines love crawling WordPress because its structure is consistent and well known.
    If a visitor can’t find a page, then why would a Search Engine? Don’t rely on your sitemap, but on your content and website’s usability.

    I hope this helps ?? Cheers!

    bronwynslater

    (@bronwynslater)

    Hi there! I have used this code too because I also need the products to not show (actually just don’t want the prices to show) on google results. Is it immediate or does the site need to be re-indexed first for the products not to show?

    Thanks ??

    add_filter( ‘the_seo_framework_robots_meta_array’, ‘my_robots_adjustments’, 10, 1 );
    function my_robots_adjustments( $robots = array() ) {

    if ( ! function_exists( ‘is_product’ ) )
    return $robots;

    if ( is_product() ) {
    // Keys match the value. Legacy code.
    $robots[‘noindex’] = ‘noindex’;
    $robots[‘nofollow’] = ‘nofollow’;
    }

    return $robots;
    }

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @bronwynslater,

    Google only knows about changes of pages after their bot has crawled it again.
    So, yes, the site needs to be reindexed, this happens automatically and can take a fair while.

    If you have any more questions, please open a new topic. Cheers ??

    hola, me gustaría eliminar el enlace de los productos situados en la imagen a https://www.midominio.com/product puesto que el enlace de compra ya me redirige a un producto externo.
    en el caso de que esto no sea posible que esten en no follow

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set “noindex, nofollow” for all products in Woocommerce’ is closed to new replies.