• 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

new widget area problem; Outreach pro theme

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 › new widget area problem; Outreach pro theme

This topic is: resolved

Tagged: front page, functions, outreach, widget, widget area

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 1 month ago by Marcy.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 23, 2015 at 9:48 am #138417
    Jack
    Member

    I have made a new widget area of the outreach pro theme but am having a hard time making it appear on the home page. It is to be displayed between the home-top and home-bottom this is what I have got so far:

    in functions.php

    genesis_register_sidebar( array(
    'id'          => 'home-middle',
    'name'        => __( 'Home - Middle', 'outreach' ),
    'description' => __( 'This section will appear at above of the home Bottom  widget area.', 'outreach' ),
    ) );

    and in the front page.php

    add_action('genesis_home-middle', 'new_home_widget', 1);
    function new_home_widget() {
    
    genesis_widget_area( 'home-middle', array(
    		'before' => '<div class="new_home_widget widget-area">',
    		'after' => '</div>',
    	) );
    
    }

    Any idea’s as to why it wont show?

    Any help it greatly appreciated,
    Many Thanks,
    Jack.

    January 23, 2015 at 10:16 am #138422
    Marcy
    Participant

    Hi, Jack,
    I just saw that you posted this again. I answered on the OP, but here it is again:

    It looks like the part in the functions.php to create a new widget area is OK.

    Open the front-page.php and add to the function outreach_home_top_widgets() {, so it looks like this:

    function outreach_home_top_widgets() {
    
    	genesis_widget_area( 'home-top', array(
    		'before' => '<div class="home-top widget-area">',
    		'after'  => '</div>',
    	) );
    
           genesis_widget_area( 'home-middle', array(
    		'before' => '<div class="home-middle widget-area">',
    		'after' => '</div>',
    	) );
    	
    }

    I edited the class that you had to be “home-middle”. It will be easier to know what it is for styling, since you call it Home – Middle for what appears in the widget area.


    Marcy | Amethyst Website Design | Twitter

    January 23, 2015 at 11:53 am #138429
    Jack
    Member

    Thank you Marcy for all your help today solving my issues with the widget its now working and just needs a bit of styling, It was greatly appreciated.

    Have a good day,
    Many thanks,
    Jack.

    January 23, 2015 at 2:24 pm #138451
    Marcy
    Participant

    You're welcome, Jack!


    Marcy | Amethyst Website Design | Twitter

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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