Skip to content
wpbeaches
  • Home
  • About
  • Services
  • Work
    • Template Library
    • Web Development
    • Portfolio
  • Contact
  • Blog
    • ACF
    • Beaver
      • Beaver Builder
      • Beaver Theme
      • Beaver Themer
    • Genesis
    • jQuery
    • macOS
    • WordPress
    • WooCommerce

Using the new WordPress custom-logo theme support with Genesis

April 16, 2016 - 7 Comments

WordPress 4.5 added a new theme support feature for using a custom logo which allows a logo to be uploaded and used via the Customizer, this guide take you through using it with Genesis using the Sample Theme for an example.

The terminology of custom_logo will make more sense to end users than custom_header

To add the logo support to your theme add the add_theme_support function in your theme’s function.php add in your size dimensions, I leave flex values on so I can skip cropping.

Now you can see the meta box in the Customizer under the site identity panel.

custom-logo-genesis

 

Displaying the logo in the front end of the site

To output the logo we need to check that it exists and use it if it does, if it doesn’t then the fallback is to use the site title and tag line. The logo is checked with the has_custom_logo check. I am using the genesis_seo_title filter to add in the logo.

 

In the 2nd function in this code block the site description is hidden if the custom logo exists, this also uses the has_custom_logo and if true adds the .screen-reader-text class to hide it.

 

genesis-custom-logo

Also worth noting is that a .custom-logo class is given to the img and a .custom-logo-link to the containing link tag.

You also can output the custom_logo() wherever you need to.

Removing the Default Genesis Title/Logo Meta Box

You can remove the default Genesis title/logo meta box in the theme settings and Customizer control under Site Identity

remove-genesis-logo-box

By adding the above in your functions.php

Ref & Ref & Ref

Related Posts:

  • Output a Custom Taxonomy Archive by using Loop in WordPress
    Output a Custom Taxonomy Archive by using Loop in WordPress
  • Set noindex nofollow on posts from specific category using Yoast WordPress SEO
    Set noindex nofollow on posts from specific category using…
  • Block xmlrpc.php WordPress running on OpenLiteSpeed using .htaccess
    Block xmlrpc.php WordPress running on OpenLiteSpeed using…
  • Using wp-cli commands to create and import WordPress databases
    Using wp-cli commands to create and import WordPress…
  • Hide a Custom Post Type's Single and Archive Pages in WordPress
    Hide a Custom Post Type's Single and Archive Pages in…
  • Output WordPress Custom Query Posts Loop in Bootstrap Modals
    Output WordPress Custom Query Posts Loop in Bootstrap Modals
  • How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal
    How to Add to the Shell Path in macOS Big Sur and Catalina…
  • Using WooCommerce with Varnish, exclude pages and cookies
    Using WooCommerce with Varnish, exclude pages and cookies
Categorized WordPress Tagged customizer, genesis, logo
Get Beaver Builder Now!

Tags

ACF apache archive beaver beaver builder beaver theme beaver themer bootstrap cache category cpt css customizer filter flexbox footer form genesis header homebrew htaccess iconfonts image javascript jquery loop markup menu meta mysql php repeater runcloud search filter pro serverpilot shortcode slider taxonomy template twentytwelve UI/UX while widget woocommerce wp-cli

Donate

If you found something that helped you out and would like to make a donation, that's great

PowerPack Beaver Builder Addon

Our Location

We are based in the Northern Beaches of Sydney and work with both local and overseas based clients.

Work With Us

Let us know your web requirements, see our services and use the contact form to get in touch and start the ball rolling.

Check Us Out

  • Home
  • Blog
  • About
  • Services

© 2017 · NEIL GOWRAN · POWERED BY WORDPRESS, BEAVER, AND HOSTED ON RUNCLOUD AND RACKNERD

Scroll To Top