• 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

genesis_before_content_sidebar_wrap activation

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 › genesis_before_content_sidebar_wrap activation

This topic is: resolved

Tagged: genesis_before_content_sidebar_wrap, hook, Magazine Pro, register widget area

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 3 months ago by ClintN.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 28, 2015 at 2:21 am #169326
    ClintN
    Participant

    I would like to add a global strip of content under the header

    I want to use the genesis_before_content_sidebar_wrap hook for this but when activating with the below code I get this error:

    Parse error: syntax error, unexpected 'add_action' (T_STRING) in /home/content/p3pnexwpnas05_data01/22/2890422/html/wp-content/themes/magazine-pro/functions.php on line 123

    //* Add support for before content sidbar wrap
    add_action( 'genesis_before_content_sidebar_wrap', 'add_genesis_widget_area' );
    function add_genesis_widget_area() {
                    genesis_widget_area( 'before-content-sidebar-wrap', array(
    		'before' => '<div class="before-content-sidebar-wrap widget-area">',
    		'after'  => '</div>',
        ) );
    
    }
    
    //* Register widget areas
    genesis_register_sidebar( array(
    'id' => 'before-content-sidebar-wrap',
    'name' => __( 'Media strip', 'Magazine Pro' ),
    'description' => __( 'This is the media strip of the header', 'Magazine Pro' ),
    ) );

    Line 23 is actually add_action( 'genesis_before_content_sidebar_wrap', 'add_genesis_widget_area' );

    As you can tell i am using Magazine Pro theme, but I doubt that that is the issue. I am a bit lost as I have been using similar code successfully to register widget areas

    October 28, 2015 at 2:55 am #169327
    Brad Dalton
    Participant

    The problems in your file, not the code as i tested it and it works.

    Line 23 or line 123?


    Get Help – Book Consultation.

    October 28, 2015 at 3:20 am #169332
    ClintN
    Participant

    Cheers Brad,

    Was line 123,

    I moved it up a bit higher to around line 70 and BAM there she was.

    Thanks again I appreciate your testing & troubleshooting

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

© 2023 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