Skip to content

Instantly share code, notes, and snippets.

@pshapiro
Last active March 15, 2016 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pshapiro/13bbb96bf375df1b5840 to your computer and use it in GitHub Desktop.
Save pshapiro/13bbb96bf375df1b5840 to your computer and use it in GitHub Desktop.
Fix for publisher logo in AMP WP Plugin
/* Edit the class-amp-post-template.php file, either via FTP or within your WordPress Dashboard (go to Plugins > Editor and then select “AMP”) and change this:
if ( $site_icon_url ) {
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => $site_icon_url,
'height' => self::SITE_ICON_SIZE,
'width' => self::SITE_ICON_SIZE,
);
}
to this:
*/
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => 'http://domain.com/wp-content/uploads/logo-60.png',
'height' => 60,
'width' => 170,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment