• 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

Adding Full-Width Widget Area to Magazine 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 › Design Tips and Tricks › Adding Full-Width Widget Area to Magazine Pro

This topic is: not resolved

Tagged: 728x90, Metro, widget

  • This topic has 12 replies, 5 voices, and was last updated 11 years, 10 months ago by smkyle1.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • July 2, 2014 at 8:17 pm #112755
    [email protected]
    Member

    Hi folks;

    As much as the next guy hates being the ones to ask a repeat question, I can say that I *did* look around first to see if I could find the answer.

    A burning desire to get my real estate website looking EXACTLY how I want lately has lead me to learn a lot more about CSS. I am still stumped on this one though. I am using Magazine Pro, and I want to add a widget area above the Home Top area, but below the navigation to basically put a full-width slider in.

    I found the following code and have attempted to use it, but it freezes my entire wp-admin back panel. I have been successful in changing pre-existing code thus far, and finding what I need in the depths, but adding this code has not turned out well. Any advice is immensely appreciated!

    genesis_register_sidebar( array(
    	'id'          => 'before-home',
    	'name'        => __( 'Home Before Content', 'wpsites' ),
    	'description' => __( 'Displays Before Content On Home Page.', 'wpsites' ),
    ) );
    /**
     * @author    Brad Dalton
     * @example   http://wpsites.net/web-design/add-widget-area-before-content/
     * @copyright 2014 WP Sites
     */
    add_action( 'genesis_before_content', 'wpsites_widget_before_home' );
    function wpsites_widget_before_home() {
    if ( is_home() && is_active_sidebar('before-content') ) {
    	genesis_widget_area( 'before-home', array(
    		'before' => '<div class="before-home" class="widget-area">',
    		'after'  => '</div>',
    	) );
        }
    }
       
    http://www.alexanderhendrickson.com
    July 2, 2014 at 9:28 pm #112757
    Brad Dalton
    Participant

    Please link to the source of the code. Thanks.


    Tutorials for StudioPress Themes.

    July 2, 2014 at 9:46 pm #112766
    [email protected]
    Member

    Am I missing something? The Magazine Pro code, or the code I posted? The link (http://wpsites.net/web-design/add-widget-area-before-content/) is right in the middle OF the code. In fact it is your code. I posted that because I believed from what I know that it should affect my desired result, but it doesn't.

    Thanks!

    July 2, 2014 at 9:58 pm #112768
    Brad Dalton
    Participant

    Please copy ALL the code from the view raw link in the Gist and paste it at the end of your child themes functions.php file using a text editor like Notepad++

    I tested this code and it works.


    Tutorials for StudioPress Themes.

    July 2, 2014 at 10:20 pm #112773
    [email protected]
    Member

    Just did that and now it works too. Was I missing something before? I thought I had copied all of it. Not sure what is different now.

    Thank you!

    July 2, 2014 at 10:25 pm #112774
    Brad Dalton
    Participant

    I changed one of the conditional checks. is_active_sidebar('before-home')


    Tutorials for StudioPress Themes.

    July 5, 2014 at 6:38 am #113036
    Blenda Yáñez
    Participant

    Hi Braddalton

    I subscribe to your newsletter a few days ago but I can not access your site. Only the homepage is available in Brazil. You know that? Why can not I login? when the following message appears: " Sorry but this content is not available in your country at the moment"

    I'm sorry because I like to learn from your tutorials and use his teachings to improve my site.

    July 5, 2014 at 11:54 pm #113114
    Brad Dalton
    Participant

    What is your domain name?


    Tutorials for StudioPress Themes.

    August 7, 2014 at 4:43 pm #117665
    wasanajones
    Member

    thanks Brad - I had strayed away from genesis following the lure of easy layouts... but now I know nothing beats the support found here

    August 7, 2014 at 7:43 pm #117684
    Brad Dalton
    Participant

    Understand, Its hard to get top quality support for free from unpaid forum volunteers.


    Tutorials for StudioPress Themes.

    August 7, 2014 at 11:05 pm #117706
    smkyle1
    Member

    Brad,

    I tried the code you wrote for Alexander on my Metro Pro child theme and it worked great. I would like to do something similar but I want my widget to be positioned at the very top of the page - above my header and I'd like it centered.

    Here is my site:

    http://www.laprogressive.com

    thanks so much,

    Sharon

    August 7, 2014 at 11:24 pm #117709
    Brad Dalton
    Participant

    Change the genesis_before_content hook to wp_head or genesis_before_header and then use CSS to center your content.

    Note: All functions and widgets need to use unique names and I.D's


    Tutorials for StudioPress Themes.

    August 8, 2014 at 12:52 pm #117802
    smkyle1
    Member

    thank you so much -- you've saved me a lot of time

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