• Resolved Hubert Nguyen

    (@hubertnguyen)


    Hello, I would prefer to output my own LD+JSON data, and it seems like the plugin is already doing something like this when calling

    do_action( ‘amp_post_template_head’, $this );

    Is there a way to disable the LD+JSON outpout in this function? I’m not sure how to remove this hook:

    add_action( ‘amp_post_template_head’, ‘amp_post_template_add_schemaorg_metadata’ );

    Thanks!
    Hubert

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

    (@westonruter)

    What you could do is add this to your theme or custom plugin:

    remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata' );

    But, it would be better if you supply you own data via the amp_schemaorg_metadata filter:

    add_filter( 'amp_schemaorg_metadata', function( $metadata ) {
    	// ... modify $metadata here as needed ...
    	return $metadata;
    } );
Viewing 1 replies (of 1 total)
  • The topic ‘Custom ld+json, how to disable the default one’ is closed to new replies.