Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to use Google's Organisation Logo Schema.org markup with WordPress Theme Logo
function mytheme_setup() {
add_theme_support('custom-logo');
}
add_action('after_setup_theme', 'mytheme_setup');
<div itemscope itemtype="http://schema.org/Organization">
<a itemprop="url" href="http://www.yourdomain.co.uk/">
<img itemprop="logo" src="http://www.yourdomain.co.uk/logo.png" alt="Company name" />
</a>
</div>
<div itemscope itemtype="http://schema.org/Organization">
<?php if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
} ?>
</div>
<div itemscope itemtype="http://schema.org/Organization">
<a href="https://www.thewirelessguy.co.uk/" class="custom-logo-link" rel="home" itemprop="url" tabindex="0">
<img width="249" height="56" src="https://www.thewirelessguy.co.uk/wp-content/uploads/2016/05/logo.png" class="custom-logo" alt="The Wireless Guy logo" itemprop="logo">
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment