• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to add SVG logo before website name in header?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add SVG logo before website name in header?

This topic is: not resolved

Tagged: css, header, Logo, menu, php, SVG

  • This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by Victor Font.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 22, 2017 at 10:00 am #214743
    Matus
    Member

    I'd like to display SVG logo before website name in header. Both, the text and logo should be linked to homepage on click.

    What I've tried?
    Current status is, I can only see logo or only text. I'd like to show them both.

    1. I edit this code in Genesis Sample child theme's functions.php file:

    // Add support for custom header.
    add_theme_support( 'custom-header', array(
    	'width'           => 110,
    	'height'          => 79,
    	'header-selector' => '.site-title a',
    	'header-text'     => false,
    	'flex-width'      => true,
    	'flex-height'     => true,
    ) );
    
    // Show option to change logo in WP customizer
    register_default_headers( array(
        'svg-logo' => array(
        'url'   => '%2$s/images/logo.svg',
        'thumbnail_url' => '%2$s/images/logo.svg',
        'description'   => __( 'SVG Logo', 'CHILD_TEXT_DOMAIN' ),
        ),
    ));

    2. I replaced width and height in code above to match image size I want to use.
    3. Also, I uploaded image with name logo.svg to the genesis-sample/images folder.

    What should I do next?
    Any help appreciated.

    https://akouspesne.sk
    December 22, 2017 at 11:06 am #214744
    Victor Font
    Moderator

    WordPress does not support SVG images out of the box. Install the SVG Support plugin so the correct mime type is setup. https://wordpress.org/plugins/svg-support/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 22, 2017 at 11:25 am #214745
    Matus
    Member

    Thank you Victor, what should I do next?

    December 23, 2017 at 8:57 am #214762
    Victor Font
    Moderator

    I wouldn't have added any code for registering the default headers. Support for Custom headers should already exist in your theme. Enabling the flex-height and flex-width is correct. This allows you to skip cropping when a SVG is uploaded.

    After you upload the SVG, only the image will display. The site description is easy enough. You need to change the text indent to bring it back onto the screen. The site title is a little more difficult. Uploaded images are added as background images to the site-title link. The text is still there but hidden off screen. You can change the text-indent for the site-title a element to bring the text back on the screen, but it will be over the image. You have to adjust the positioning to show it where you want to. It all sounds easy, but it's not.

    The alternative is to create your own custom header to replace the standard Genesis header. I have a tutorial that teaches you how to do this using CSS Grid: https://victorfont.com/customize-the-genesis-header-with-css-grid-layout/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble