• 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

Add widget before site-banner-header in Beautiful Pro Theme

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 › Add widget before site-banner-header in Beautiful Pro Theme

This topic is: not resolved

Tagged: Add Widget

  • This topic has 4 replies, 3 voices, and was last updated 10 years, 4 months ago by Summer.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 28, 2015 at 7:54 am #157733
    TracyRochester
    Member

    http://coach4.businesswebstrategies.com/
    username: coach4
    password: template

    I wanted to add some organic shapes to the site-header-banner and so added a widget area below the header using this code:

    genesis_register_sidebar( array(
    'id' => 'after-header',
    'name' => __( 'After Header', 'beautiful' ),
    'description' => __( 'This is the after header widget area.', 'beautiful' ),
    ) );

    //* Hook after header widget area after site header
    add_action( 'genesis_after_header', 'bws_after_header_widget_area' );
    function bws_after_header_widget_area() {

    genesis_widget_area( 'after-header', array(
    'before' => '</div></div>',
    'after' => '<div class="after-header widget-area"><div class="wrap">',
    ) );

    }

    It seems to work fine. I now have a widget area called "After Header", and I was able to add an image to it.

    The theme already had a before header widget area. To test, If I put something there like search it appears above the site title.

    What I want is for a widget to appear after the site title area and before the site-header-banner. (That way I can add an image to the top and bottom of the site-header-banner image to make it organically shaped. )

    The next div after the header is: <div class="site-header-banner"></div>

    In the code above, if I replace "genesis__after_header" with "genesis_after_site_header_banner" I get a widget, but when I put an image in it, nothing shows on the page.

    I know I'm missing a step, but I don't know what it is.

    Thanks in advance for suggestions.

    http://coach4.businesswebstrategies.com/
    June 28, 2015 at 8:54 am #157739
    emasai
    Participant

    "genesis_after_site_header_banner" is not a hook, so although your function may be correct the widget is not attached. See the Visual Hook Guide to understand the available hooks.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    June 29, 2015 at 2:50 pm #157877
    TracyRochester
    Member

    Thank you. That was my thinking, too. May seem like silly question, but is it possible to write a hook?

    June 29, 2015 at 2:54 pm #157878
    emasai
    Participant

    No it is not possible to write a hook. You have to use the available ones and then restyle them to fit with css.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    June 30, 2015 at 1:20 am #157898
    Summer
    Member

    Maybe I'm overthinking this, or misunderstanding what you want to achieve, but could you just add a :before and :after to site-header-banner in CSS to get the before & after images you want?

    That way you can add your decorative styling without needing to fuss with extra widgets. That's how a lot of themes do the decorations for blockquotes, so I'm guessing it would be the same for a particular header... again, unless I'm misunderstanding what you're trying to accomplish.


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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