• 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 a new div with 2 widget areas

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 a new div with 2 widget areas

This topic is: resolved

Tagged: code, template, theme, widget

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 4 months ago by Jeffrey.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 16, 2012 at 5:04 pm #375
    Jeffrey
    Member

    I'm trying to add a new div via the genesis_before hook with a method I've used in the past, but it's not working. I already have my widget areas registered and CSS in place, but the call I've used in the past isn't working. I'm using:

    <code>
    add_action('genesis_before', below_primary_nav' );
    function executive_include_below_top_nav() {
    require(CHILD_DIR.'/below-top-nav.php');
    }</code>

    My widget areas are registered as follows:

    <code>

    genesis_register_sidebar( array(
    'id' => 'below-top-nav-left',
    'name' => __( 'Below Top Nav Left', 'magazine' ),
    'description' => __( 'This is below top nav left section.', 'magazine' ),
    ) );

    genesis_register_sidebar( array(
    'id' => 'below-top-nav-right',
    'name' => __( 'Below Top Nav Right', 'magazine' ),
    'description' => __( 'This is below top nav right section.', 'magazine' ),
    ) );</code>

    And yes, I have the below-top-nav.php file uploaded to the theme files (and it is visible in the editor).

    I need to use this method b/c I want to have 2 side by side widget areas in that section. This method worked for me on a site I built a year ago, but isn't working now, giving me a message of "syntax error, unexpected T_CONSTANT_ENCAPSED_STRING".

    Any advice on the fix for this -- or for a different method.

    Here's the dev server for the site: http://wood.jeffrey-davis.net

    November 16, 2012 at 8:29 pm #391
    nickthegeek
    Member

    I answered you over in the old forums on this. There is a ' missing before below_primary_nav

    November 16, 2012 at 8:56 pm #395
    Jeffrey
    Member

    Thanks Nick! Just replied to you over there in response to the fix you suggested.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Adding a new div with 2 widget areas’ 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

© 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