How to add content to stretch across page just under my menu

Community Forums Forums Design Tips and Tricks How to add content to stretch across page just under my menu

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  melissamal 5 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #102711

    melissamal
    Member
    Post count: 18

    How can I add content such as my subscribe bar to stretch across the full width of the page just under my full width menu before my side bars?

    I have an “add to Content” plugin which works great, but it puts the content/item in the page next to the side bar, not the full width.

    Thank you in advance!

    http://www.integrativenutritionaltherapies.com/
    #102723

    nunotmp
    Participant
    Post count: 164

    I see your subscribe bar at the bottom is full width inside of a text widget. To do what you are asking is fairly simple.

    If you are comfortable with editing your functions.php file you can use something like this.
    1. register a new widget area

    genesis_register_sidebar( array(
    	'id'          => 'subscribe-area',
    	'name'        => __( 'Subscribe Area', 'genesis' ),
    	'description' => __( 'This is a widget for the subscription box.', 'genesis' ),
    ) );

    2. Create the function to house the widget area.

    function my_sub_box() { 
    genesis_widget_area( 'subscribe-widget', array(
    		'before' => '<div class="subscription-area">',
    		'after'  => '</div>',
    	) );

    3. You can now hook the widget area where ever you would like. To get a full-width area you need to hook into genesis_after_header because this places your div outside of the .wrap div. If you hook into the genesis_before_content you will place your div into the .wrap div and it will not stretch full width.
    add_action( 'genesis_after_header', 'my_sub_box' );

    This will display on all post you will need to add additional conditions if you would like to limit the box to certain pages.


    #102766

    melissamal
    Member
    Post count: 18

    You say editing my functions php file, do you mean copying the code from #1 and #2 you posted and simply pasting it in at the bottom of my php file? I’ll need more step by step, I’m not real comfortable with that.

    Also, is there an easier (safer than changing the code) way to do this, like using a widget or plugin?

    Thank you

    #103581

    melissamal
    Member
    Post count: 18

    Folks do not install the code as suggested! A plugin (genesis simple hooks) very easily does the trick!

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

You must be logged in to reply to this topic.