Adding Full-Width Widget Area to Magazine Pro

Community Forums Forums Design Tips and Tricks Adding Full-Width Widget Area to Magazine Pro

This topic is: not resolved

Tagged: , ,

This topic contains 12 replies, has 5 voices, and was last updated by  smkyle1 1 month, 3 weeks ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #112755

    alexanderhendrickson@me.com
    Member
    Post count: 2

    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
    #112757

    braddalton
    Participant
    Post count: 9915

    Please link to the source of the code. Thanks.


    #112766

    alexanderhendrickson@me.com
    Member
    Post count: 2

    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!

    #112768

    braddalton
    Participant
    Post count: 9915

    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.


    #112773

    alexanderhendrickson@me.com
    Member
    Post count: 2

    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!

    #112774

    braddalton
    Participant
    Post count: 9915

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


    #113036

    missblenda
    Participant
    Post count: 16

    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.

    #113114

    braddalton
    Participant
    Post count: 9915
    #117665

    wasanajones
    Participant
    Post count: 5

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

    #117684

    braddalton
    Participant
    Post count: 9915

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


    #117706

    smkyle1
    Participant
    Post count: 9

    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

    #117709

    braddalton
    Participant
    Post count: 9915

    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


    #117802

    smkyle1
    Participant
    Post count: 9

    thank you so much — you’ve saved me a lot of time

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.