• 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

Logo Issue-Enterprise Pro

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 › General Discussion › Logo Issue-Enterprise Pro

This topic is: resolved

Tagged: Enterprise Pro, header logo

  • This topic has 7 replies, 2 voices, and was last updated 9 years, 6 months ago by double_r.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • June 3, 2016 at 3:15 pm #186904
    double_r
    Member

    Site: http://www.sniderfarmspeanutbarn.com/
    Theme: Enterprise Pro
    Plugins: WooCommerce, Genesis Connect for WooCommerce, Genesis Simple Sidebars, WP Super Cache, Ninja Forms

    Issue: My logo is on every page header except the homepage. The issue arose after I switched from the Enterprise Pro theme to the WooCommerce Storefront theme, and then back to Enterprise Pro. It was fine before the theme switches. I've seen on a similar post to empty the WP Super Cache, so I did that with no resolution to my issue. I've also cleared my browsing data. Thanks in advance!

    functions.php:
    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );

    //* Setup Theme
    include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );

    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'enterprise', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'enterprise' ) );

    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Enterprise Pro Theme', 'enterprise' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/enterprise/' );
    define( 'CHILD_THEME_VERSION', '2.1.1' );

    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );

    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );

    //* Enqueue Scripts
    add_action( 'wp_enqueue_scripts', 'enterprise_load_scripts' );
    function enterprise_load_scripts() {

    wp_enqueue_script( 'enterprise-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );

    wp_enqueue_style( 'dashicons' );

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700,300italic|Titillium+Web:600', array(), CHILD_THEME_VERSION );

    }

    //* Add new image sizes
    add_image_size( 'featured-image', 358, 200, TRUE );
    add_image_size( 'home-top', 750, 600, TRUE );

    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    'header-selector' => '.site-title a',
    'header-text' => false,
    'height' => 80,
    'width' => 320,
    ) );

    //* Add support for additional color style options
    add_theme_support( 'genesis-style-selector', array(
    'enterprise-pro-black' => __( 'Enterprise Pro Black', 'enterprise' ),
    'enterprise-pro-green' => __( 'Enterprise Pro Green', 'enterprise' ),
    'enterprise-pro-orange' => __( 'Enterprise Pro Orange', 'enterprise' ),
    'enterprise-pro-red' => __( 'Enterprise Pro Red', 'enterprise' ),
    'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ),
    ) );

    //* Add support for structural wraps
    add_theme_support( 'genesis-structural-wraps', array(
    'header',
    'nav',
    'subnav',
    'site-inner',
    'footer-widgets',
    'footer',
    ) );

    //*
    add_theme_support( 'genesis-connect-woocommerce' );

    //* Reposition the secondary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_footer', 'genesis_do_subnav', 7 );

    //* Reduce the secondary navigation menu to one level depth
    add_filter( 'wp_nav_menu_args', 'enterprise_secondary_menu_args' );
    function enterprise_secondary_menu_args( $args ){

    if( 'secondary' != $args['theme_location'] )
    return $args;

    $args['depth'] = 1;
    return $args;

    }

    //* Remove comment form allowed tags
    add_filter( 'comment_form_defaults', 'enterprise_remove_comment_form_allowed_tags' );
    function enterprise_remove_comment_form_allowed_tags( $defaults ) {

    $defaults['comment_notes_after'] = '';
    return $defaults;

    }

    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );

    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );

    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );

    //* Register widget areas
    genesis_register_sidebar( array(
    'id' => 'home-top',
    'name' => __( 'Home - Top', 'enterprise' ),
    'description' => __( 'This is the top section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-middle',
    'name' => __( 'Home - Middle', 'enterprise' ),
    'description' => __( 'This is the middle section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-bottom',
    'name' => __( 'Home - Bottom', 'enterprise' ),
    'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ),
    ) );

    /* remove the text title and description */
    remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
    remove_action( 'genesis_site_description', 'genesis_seo_site_description' );

    /* use the SEO logo */
    add_action( 'genesis_site_title', 'vmf_seo_schema_site_logo' );

    /**
    * Filter genesis_seo_title to use an image for the logo instead of a background image
    * You must remove any logo images you set on the appearance/header or customize/header page(s)
    *
    * The genesis_seo_site_title function is located in genesis/lib/structure/header.php
    * @link http://victorfont.com/genesis-seo-site-logo
    *
    */

    function vmf_seo_schema_site_logo() {

    //* Set what goes inside the wrapping tags
    $inside = sprintf( '<div itemscope itemtype="http://schema.org/Organization">%s</div>', trailingslashit( home_url() ), get_bloginfo( 'name' ), get_bloginfo( 'name' ) . ' logo', get_bloginfo( 'name' ) );

    //* Determine which wrapping tags to use
    $wrap = is_home() && 'title' === genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';

    //* A little fallback, in case an SEO plugin is active
    $wrap = is_home() && ! genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : $wrap;

    //* And finally, $wrap in h1 if HTML5 & semantic headings enabled
    $wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : $wrap;

    //* Build the title
    $title = genesis_html5() ? sprintf( "<{$wrap} %s>", genesis_attr( 'site-title' ) ) : sprintf( '<%s id="title">%s</%s>', $wrap, $inside, $wrap );
    $title .= genesis_html5() ? "{$inside}</{$wrap}>" : '';

    //* Echo (filtered)
    echo apply_filters( 'genesis_seo_title', $title, $inside, $wrap );

    }

    http://www.sniderfarmspeanutbarn.com/
    June 3, 2016 at 3:37 pm #186908
    Victor Font
    Moderator

    The logo is being loaded on your home page, but the header div is only 4px high. Not sure why either. I tried changing a few dimensions in my browsers inspect element tool, but nothing I tried worked.

    BTW, I don't see my code on your home page. I only see the background image.


    Regards,

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

    June 3, 2016 at 3:41 pm #186909
    double_r
    Member

    Yeah, I also saw that in dev tools and can't figure out what is suddenly making the home header 4px tall. It's frustrating, because it was fine before I switched between themes. Also in dev tools, I hover over the logo url and shows the logo dimensions as "0 x 0 pixels (Natural: 900 x 370 pixels)". Thanks for looking at it.

    June 3, 2016 at 4:01 pm #186912
    double_r
    Member

    I didn't even see that your code isn't showing up on the homepage, any clues?

    June 3, 2016 at 4:17 pm #186917
    double_r
    Member

    New development, logo isn't showing on any page now.

    June 4, 2016 at 2:25 am #186929
    Victor Font
    Moderator

    Try this new code. I needed to update the code in the article. Thanks for using the code and sorry for the confusion.

    function vmf_seo_schema_site_logo() {
    
    	//* Set what goes inside the wrapping tags
    	$inside = sprintf( '<div itemscope itemtype="http://schema.org/Organization"><a itemprop="url" href="%s" title="%s"><img class="site-logo" itemprop="logo" src="'. get_stylesheet_directory_uri() .'/images/logo.png" title="%s" alt="%s" width="390" height="44" /></a></div>', trailingslashit( home_url() ), get_bloginfo( 'name' ), get_bloginfo( 'name' ) . ' logo', get_bloginfo( 'name' ) );
    
    	//* Determine which wrapping tags to use
    	$wrap = genesis_is_root_page() && 'title' === genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';
    
    	//* A little fallback, in case an SEO plugin is active
    	$wrap = genesis_is_root_page() && ! genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : $wrap;
    
    	//* Wrap homepage site title in p tags if static front page
    	$wrap = is_front_page() && ! is_home() ? 'p' : $wrap;
    
    	//* And finally, $wrap in h1 if HTML5 & semantic headings enabled
    	$wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : $wrap;
    
    	/**
    	 * Site title wrapping element
    	 *
    	 * The wrapping element for the site title.
    	 *
    	 * @since 2.2.3
    	 *
    	 * @param string $wrap The wrapping element (h1, h2, p, etc.).
    	 */
    	$wrap = apply_filters( 'genesis_site_title_wrap', $wrap );
    
    	//* Build the title
    	$title  = genesis_html5() ? sprintf( "<{$wrap} %s>", genesis_attr( 'site-title' ) ) : sprintf( '<%s id="title">%s</%s>', $wrap, $inside, $wrap );
    	$title .= genesis_html5() ? "{$inside}</{$wrap}>" : '';
    
    	//* Echo (filtered)
    	echo apply_filters( 'genesis_seo_title', $title, $inside, $wrap );
    
    }

    Regards,

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

    June 4, 2016 at 5:09 pm #186956
    double_r
    Member

    Ok, the new code got me back to where I was when I first posted this. The logo is showing up everywhere but the homepage, and it's doing the whole 4px thing again. Thanks for taking time looking into this.

    June 7, 2016 at 4:02 pm #187121
    double_r
    Member

    Turns out it was a CSS error on my end. I had apparently declared .site-title's display property as none. Problem solved. Thanks for your time, and your code is awesome!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Logo Issue-Enterprise Pro’ is closed to new 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