• 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

Wrap content within widget

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 › Wrap content within widget

This topic is: resolved

Tagged: full width widget, widget wrap

  • This topic has 2 replies, 1 voice, and was last updated 10 years, 2 months ago by hmistler.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 27, 2015 at 2:04 pm #142570
    hmistler
    Member

    Hello - I set up a before_footer widget on my about page. I wanted to feature a background color that stretches full width, which it is, but I want the text content to be inside the site wrap. I tried a few things, including this tutorial but nothing seems to be working. Here is my code:

    //* Add support for wraps
    add_theme_support( 'genesis-structural-wraps', array( 'header', 'subnav', 'inner', 'footer-widgets','footer','aboutme') );
    
    //* Add About Me widget
    add_action( 'genesis_before_footer', 'about_me' );
    function about_me() {
    		if (is_page('about'))
                    genesis_widget_area( 'about-me', array(
    		'before' => '<div class="about-me widget-area" id="aboutme">',
    		'after'  => '</div>',
        ) );
    genesis_structural_wrap( 'aboutme', 'close' );
    }
    
    genesis_register_sidebar( array(
    	'id'          => 'about-me',
    	'name'        => __( 'About Me', 'swank' ),
    	'description' => __( 'This is the About Me widget', 'swank' ),
    ) );

    Should I keep trying to wrap this content? Or maybe change the widget to "after_content" and get the background color outside of the wrap? I'm at a loss! Thanks!

    http://www.haleymistler.com/about/
    February 27, 2015 at 2:18 pm #142572
    hmistler
    Member

    Sorry for the confusion - I was able to get that previous wrap tutorial to work (had left out one line) but it wraps my background color as well. So I'm back to my original code:

    //* Add About Me widget
    add_action( 'genesis_before_footer', 'about_me' );
    function about_me() {
    		if (is_page('about'))
                    genesis_widget_area( 'about-me', array(
    		'before' => '<div class="about-me widget-area" id="aboutme">',
    		'after'  => '</div>',
        ) );
    }
    
    genesis_register_sidebar( array(
    	'id'          => 'about-me',
    	'name'        => __( 'About Me', 'swank' ),
    	'description' => __( 'This is the About Me widget', 'swank' ),
    ) );

    I feel like I need to add this somewhere:
    <div class="wrap"> But I am not sure where I need to add it so the content wraps but not the background. Hope that makes sense...

    February 27, 2015 at 2:37 pm #142579
    hmistler
    Member

    Me again - happy to report I solved this issue! Here's what I changed, in case anyone else has this problem:

    //* Add About Me widget
    add_action( 'genesis_before_footer', 'about_me' );
    function about_me() {
    		if (is_page('about'))
                    genesis_widget_area( 'about-me', array(
    		'before' => '<div class="about-me widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
        ) );
    
    }
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Wrap content within widget’ is closed to new 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