• Resolved arafail

    (@arafail)


    Hello!
    You plugin is probably the best thing that happened to the internet since wordpress.
    I was wondering if you could help me with a small issue:
    I have this page:
    [ redundant link removed, just use the link field ]

    On the structured data tester, it shows ok, https://search.google.com/structured-data/testing-tool/

    However, I would like to remove this type: https://i.imgur.com/HgRaKoB.png, so that only techArticle remains.
    I have traced the problem to this piece of code which your plugin appends to the header:
    <script type="application/ld+json">{"publisher":{"name":"Digital Citizen"},"description":"Cum configurezi modul Economisire Baterie din Windows 10? Cum il pornesti si cum il opresti? Cum te ajuta sa economisesti baterie?","image":null,"@type":"Article"}</script>

    How can I remove it?
    Thanks!

    • This topic was modified 4 years, 11 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    I’m not entirely sure where that is coming from because I don’t see the expected "@context":"https://schema.org".

    What happens if you add this plugin code:

    add_filter( 'amp_post_template_metadata', '__return_empty_array', PHP_INT_MAX );

    Plugin Author Weston Ruter

    (@westonruter)

    Or rather, this would be better now in 1.5.x:

    add_filter(
    	'amp_optimizer_config',
    	function( $config ) {
    		$config['transformers'] = array_diff(
    			$config['transformers'],
    			[ \AmpProject\AmpWP\Transformer\AmpSchemaOrgMetadata::class ]
    		);
    		return $config;
    	}
    );
    • This reply was modified 4 years, 11 months ago by Weston Ruter.
    Thread Starter arafail

    (@arafail)

    Thank you very much!
    Both pieces of code do the job.
    I will use the second one.
    You know what really grinds my gears? Your plugin is not as well rated as others, but performs better!
    Thanks again!

    Plugin Author Weston Ruter

    (@westonruter)

    @arafail Thank you! If you haven’t done so already, please leave our plugin a review to improve the ratings!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing ld script’ is closed to new replies.