• 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

Displaying logo and tagline/description marked with h2 tag in Magazine Pro child

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 › Displaying logo and tagline/description marked with h2 tag in Magazine Pro child

This topic is: resolved

Tagged: header, Logo, Magazine Pro, site description

  • This topic has 5 replies, 2 voices, and was last updated 8 years, 11 months ago by yoyo2008.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 11, 2017 at 8:41 am #200960
    yoyo2008
    Participant

    Hi, I'm using Magazine Pro child theme since years and didn't had any prob to switch from text logo to image.
    Now I would like to also add below the logo the tagline (wordpress description).

    On http://wpsites.net I found this PHP code to paste into functions.php of the child theme:

    add_filter( 'genesis_seo_title', 'filter_title_with_logo', 10, 3 );
    /**
    * @author Brad Dalton
    * @example http://wpsites.net/web-design/add-logo-above-taglinedescription-in-genesis/
    * @copyright 2014 WP Sites
    */
    function filter_title_with_logo( $title, $inside, $wrap ) {
    $inside = sprintf( '%s', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    $title = sprintf('<%s class="site-title">%s</%s>', $wrap, $inside, $wrap);
    return sprintf( '<%1$s id="title">%2$s</%1$s>', 'h1', $inside );
    }

    Original URL for credits.

    It just works perfectly, but I would like to mark the tagline with h2 tag.

    I'm not skilled on PHP and CSS, how can I solve this?
    Or are there any other ways tho show in the header a logo image above the site description, necessarily marked with h2 tag?
    Thank you.

    February 11, 2017 at 8:58 am #200961
    Victor Font
    Moderator

    You can use:

    add_filter( 'genesis_site_description_wrap', 'h2' );


    Regards,

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

    February 11, 2017 at 9:47 am #200964
    yoyo2008
    Participant

    Thank you very much Victor, I put it at the end of functions.php but a warning came out:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'h2' not found or invalid function name in /var/www/domains/websitename.com/public_html/wp-includes/class-wp-hook.php on line 298 < class="site-description" itemprop="description">This is the tagline

    Do I have to inset that code in a particular point?

    February 11, 2017 at 10:43 am #200967
    Victor Font
    Moderator

    Sorry, ran too fast. Use this:

    add_filter( 'genesis_site_description_wrap', 'description_h2_wrap' );
    function description_h2_wrap()  {
        return 'h2';
    }

    Regards,

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

    February 11, 2017 at 5:28 pm #200973
    yoyo2008
    Participant

    Oh, thank you Victor! Everything's ok.

    February 12, 2017 at 11:37 am #201001
    yoyo2008
    Participant

    Sorry the only thing I cannot figure it is, finally I have to put the two code snippets in functions.php? Like this?

    add_filter( 'genesis_seo_title', 'filter_title_with_logo', 10, 3 );
    /**
    * @author Brad Dalton
    * @example http://wpsites.net/web-design/add-logo-above-taglinedescription-in-genesis/
    * @copyright 2014 WP Sites
    */
    function filter_title_with_logo( $title, $inside, $wrap ) {
    $inside = sprintf( '%s', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    $title = sprintf('<%s class="site-title">%s</%s>', $wrap, $inside, $wrap);
    return sprintf( '<%1$s id="title">%2$s</%1$s>', 'h1', $inside );
    }

    add_filter( 'genesis_site_description_wrap', 'description_h2_wrap' );
    function description_h2_wrap() {
    return 'h2';
    }

    Doing this in my Magazine Pro child theme it now marks h2 the description

    <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>

    but it didn't shows it.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 2026 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