• 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

Help with adding a widget to content

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 › General Discussion › Help with adding a widget to content

This topic is: resolved
  • This topic has 1 reply, 1 voice, and was last updated 9 years, 10 months ago by Nomad.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 6, 2013 at 6:06 am #39505
    Nomad
    Member

    Hi Guys....would appreciate some help as im sure its a small thing i am missing here...but not enough sleep is making my mind dull 🙂

    I am customizing the minimum theme....and am adding some extra content to the home.php template

    I have developed the content in a file called mid-content.php and all is working fine. I have registered a new widget to go in this content so i can add form 7 shortcodes to it. My content and form is showing up great and all is being styled but there is a "1" showing up after my form and for the life of me i do not know how to get rid of it.

    this is what i have done:

    All new content in mid-content.php file -

    have registered the new widget in functions.php

    /** MY Registered widget areas */
    genesis_register_sidebar( array(
    'id'                => 'content-form-widget',
    'name'            => __( 'Added Mid Content #1', 'minimum' ),
    'description'    => __( 'This is the Added #1 section.', 'minimum' ),
    ) );

    Add action and function to home.php

    add_action( 'genesis_before_content', 'add_mid_content' );
    function add_mid_content() {
    require(CHILD_DIR.'/mid-content.php');
    }

    The mid-content.php file looks like this

    echo'<div id="contact-strips"><div class="strips">
    <div class="wrap"><h5 class="midcontent-header">Contact:</h5>';
    echo '</div></div></div>';

    echo'<div id="myform">';
    echo genesis_widget_area( 'content-form-widget');
    echo'</div>';

    echo'<div id="about-strips"><div class="strips"></div></div>';

    I am not the best php guy.....so would appreciate it if someone can direct me as to what i have done to get this "1" to appear after my form?

    In the widget i registered i have just added the form 7 shortcode

    sorry no link as it is a closed environment....

    thanks

    May 6, 2013 at 7:37 am #39520
    Nomad
    Member

    never mind....too many echo's

    should be

    echo'<div id="myform">';
    genesis_widget_area( 'content-form-widget');
    echo'</div>';

     

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Help with adding a widget to content’ 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