Skip to content

Instantly share code, notes, and snippets.

@neilgee
Forked from alana-mullen/function.php
Last active August 2, 2017 23:28
  • Select an option

Select an option

Revisions

  1. neilgee revised this gist Aug 2, 2017. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions logo_schema_wordpress.php
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    <div itemscope itemtype="http://schema.org/Organization">
    <?php if ( function_exists( 'the_custom_logo' ) ) {
    the_custom_logo();
    } ?>
    </div>

    <?php if ( function_exists( 'the_custom_logo' ) ) { ?>
    <div itemscope itemtype="http://schema.org/Organization">
    <?php the_custom_logo(); ?>
    </div>
    <?php } ?>
  2. @alana-mullen alana-mullen revised this gist Aug 8, 2016. No changes.
  3. @alana-mullen alana-mullen revised this gist Aug 8, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion logo_schema_wordpress.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <div itemscope itemtype="http://schema.org/Organization">
    <?php the_custom_logo(); ?>
    <?php if ( function_exists( 'the_custom_logo' ) ) {
    the_custom_logo();
    } ?>
    </div>
  4. @alana-mullen alana-mullen revised this gist Aug 8, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions function.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    function mytheme_setup() {
    add_theme_support('custom-logo');
    }

    add_action('after_setup_theme', 'mytheme_setup');
  5. @alana-mullen alana-mullen revised this gist Aug 8, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions logo_schema_wordpress_example_output.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    <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>
  6. @alana-mullen alana-mullen renamed this gist Aug 8, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. @alana-mullen alana-mullen created this gist Aug 8, 2016.
    3 changes: 3 additions & 0 deletions logo_schema_wordpress.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <div itemscope itemtype="http://schema.org/Organization">
    <?php the_custom_logo(); ?>
    </div>
    5 changes: 5 additions & 0 deletions logo_scheme.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    <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>