Support » Plugin: AMP » Error with google search console and change of script

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    @giovannimaugeri Can you share your site and we can investigate? The plugin adds the required AMP library script already, you don’t need to modify it. For the amp-ads component or any other library components the correct method of implementing is by adding the following to your themes functions.php

    add_filter(
    	'amp_post_template_data',
    	function( $data ) {
    		$data['amp_component_scripts'] = array_merge(
    			$data['amp_component_scripts'],
    			array(
    				'amp-ad' => true,
    			)
    		);
    		return $data;
    	}
    );

    In relation to the Search Console errors you can use the plugins validation tool to check for errors, ahead of checking with Search Console. Alternatively use the AMP validator Chrome extension. Once you eliminate all errors you can request a recrawl of your site in Search Console.

    Good morning, thank you for reply.
    The website is newsicilia.it, open one of the article and in the end of url add / amp
    We want to change the script because an ad doesn’t work, and the techinical support of this ad publisher, said to try to change the scripts, with those.

    Thanks, best regards

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