• 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

Add/Register new widget in CafePro?

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 › Add/Register new widget in CafePro?

This topic is: not resolved

Tagged: cafe pro, widget

  • This topic has 6 replies, 3 voices, and was last updated 9 years, 10 months ago by lifanovsky.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 28, 2015 at 5:07 pm #142683
    bataladc
    Member

    Hi, I am trying to add a new widget after Page 1 on my site. After reading some similar posts in the forum, I managed to register the code to function.php and add it to front-page.php. I see the new widget in the Widgets area, but I can't see the widget or its contents on the page. Should I be adding any other code to these files? Any help is greatly appreciated.

    Added this to functions:

    genesis_register_sidebar( array(
    'id' => 'front-page-Newsletter',
    'name' => __( 'Front Page Newsletter', 'cafe' ),
    'description' => __( 'This is the Front Page Newsletter section.', 'cafe' ),
    ) );

    Added this to front-page:

    genesis_widget_area( 'front-page-Newsletter', array(
    'before' => '<div id="front-page-Newsletter" class="front-page-Newsletter solid-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-Newsletter' ) . '"><div class="wrap">',
    'after' => '</div></div></div>',
    ) );

    http://www.batalawashington.com/new-site
    March 1, 2015 at 6:07 am #142719
    Victor Font
    Moderator

    I don't know why, but if you change front-page-Newsletter to front-page-5 it works.

    You also need to adjust the if statement at the top of the page to:

    is_active_sidebar( 'front-page-1' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3' ) || is_active_sidebar( 'front-page-4' || is_active_sidebar( 'front-page-5' ) ) )


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 5, 2015 at 11:00 am #143340
    bataladc
    Member

    Thanks for your replay! I just realized that when I added the Newsletter widget at first, it actually replaced widget #4. So I only see the widgets for Front Page1, Newsletter, Front Page2, and Front Page3. Widget #4 isn't there anymore.

    I tried entering #5 instead of Newsletter all throughout the files but it didn't work either. I only saw the 4 default widgets.

    What am I doing wrong?

    March 5, 2015 at 6:38 pm #143390
    Victor Font
    Moderator

    First, make sure your functions.php is defining all five widget areas correctly:

    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'before-header',
    	'name'        => __( 'Before Header', 'cafe' ),
    	'description' => __( 'This is the section before the header.', 'cafe' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-1',
    	'name'        => __( 'Front Page 1', 'cafe' ),
    	'description' => __( 'This is the Front Page 1 section.', 'cafe' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-2',
    	'name'        => __( 'Front Page 2', 'cafe' ),
    	'description' => __( 'This is the Front Page 2 section.', 'cafe' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-3',
    	'name'        => __( 'Front Page 3', 'cafe' ),
    	'description' => __( 'This is the Front Page 3 section.', 'cafe' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-4',
    	'name'        => __( 'Front Page 4', 'cafe' ),
    	'description' => __( 'This is the Front Page 4 section.', 'cafe' ),
    ) );
    genesis_register_sidebar( array(
    	'id' 		  => 'front-page-5',
    	'name'		  => __( 'Front Page Newsletter', 'cafe' ),
    	'description' => __( 'This is the Front Page Newsletter section.', 'cafe' ),
    ) );

    Next, make sure the front-page has the right code in the function:

    
    function cafe_homepage_widgets() {
    
    	genesis_widget_area( 'front-page-1', array(
    		'before' => '<div id="front-page-1" class="front-page-1 solid-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-1' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-2', array(
    		'before' => '<div id="front-page-2" class="front-page-2 image-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-2' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-3', array(
    		'before' => '<div id="front-page-3" class="front-page-3 solid-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-3' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-4', array(
    		'before' => '<div id="front-page-4" class="front-page-4 image-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-4' ) . '"><div class="wrap">',
    		'after'  => '</div></div></div>',
    	) );
    
    	genesis_widget_area( 'front-page-5', array(
    		'before' => '<div id="front-page-5" class="front-page-5 solid-section"><div class="widget-area ' . cafe_widget_area_class( 'front-page-5' ) . '"><div class="wrap">',
    		'after' => '</div></div></div>',
    	) );
    
    }

    Last, make sure the if statement at the top of front-page is correct:

    if ( is_active_sidebar( 'front-page-1' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3' ) || is_active_sidebar( 'front-page-4' || is_active_sidebar( 'front-page-5' ) ) ) {

    I've made these changes to a copy of CafePro in my development environment. I know they work.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 8, 2015 at 3:12 pm #143699
    bataladc
    Member

    Hi Victor, thanks so much for your help, but for some reason it isn't working for me. I deleted all my code and I copied the code you posted into the pages and I still see only Before header and the 4 pages. I don't see the widget #5. Its so weird because when I add and register the page "Newsletter" code after the front page #1 I see the widget there, but can't see the contents on the page. It seems like I can only have 4 widgets there plus the before header. When I add a second widget after #1 my widget # 4 disappears. I am not sure whats going on. I thought it would be simpler to add an extra widget to this site. Thanks again for your help!

    March 8, 2015 at 3:33 pm #143703
    bataladc
    Member

    Hi David, it works! I am feeling so stupid right now. Ok, on my widget area I was missing widget #5 because it was actually positioned on the other column. Duh... I was refreshing the page and only seeing #4. Thanks so ,much for you help!

    September 14, 2015 at 2:10 pm #165470
    lifanovsky
    Member

    Thank you guys, this thread helped me a lot!

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

© 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