Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #454926

    Hey guys,

    I have found couple of threads on this, but I can’t figure out how to change the theme’s meta robots settings on a page basis. This will be very useful for having separate metas for ppc and seo pages, for example. For PPC I am interested in having noindex, follow, noarchive, but since I will have multiple different pages for the same keyword(for split testing) I would get penalized for having duplicate content. I also use different links(tracking software) for PPC that I don’t think would work for SEO. I know I can use some SEO plugins, but that just creates duplicate, conflicting metas.
    Is anything like this possible?

    #455576

    Hi!

    Please note that this is not a theme-related question. That being said, as far as i know robots.txt is set per domain, so no, it’s not possible to set robots.txt on a per-page basis.

    Regards,
    Josue

    #455647

    Hey Josue,

    Thank you for your reply. You guys are awesome and patient, even with not theme related questions ;)

    Nevertheless, this is what I am talking about:

    <meta name=”robots” content=”index, follow” />

    I think this is defined in the theme’s files and I need to take out the index property. There are a lot of plugins that allow you to define different metas on a page basis, such as SEO plugins or add to head plugins. But, if I use one of those, I will have 2 meta robots, one defined by the theme with the index property, and one defined by the plugin with a noindex property. I don’t mind the follow. So, if it is possible, where can I completely remove the function that defines these metas or how can I modify it?

    Thanks.

    #455675

    Hi!

    I see, well there’s a filter available for that, you can paste the following on your child theme functions.php (or Functionality if you don’t have one), for example this will remove the meta tag altogether:

    add_filter('avf_set_follow', function($meta) {
    	$meta = "";
    	return $meta;
    });
    

    Or to target a specific Page:

    add_filter('avf_set_follow', function($meta) {
    	
    	if ( is_page( 22 ) )
    	{
    		$meta = '<meta name="robots" content="index, follow" />' . "\n";
    	}
    
    	return $meta;
    });

    Best regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.