• 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

Want to add more Front Page Widget areas To Author Pro

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 › Want to add more Front Page Widget areas To Author Pro

This topic is: resolved

Tagged: Author Pro, front page, home page, widgets

  • This topic has 5 replies, 3 voices, and was last updated 5 years, 1 month ago by authorpronewbie.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 13, 2018 at 11:25 pm #223728
    authorpronewbie
    Member

    Currently Author Pro has five front page sections where widgets can be added to be a dynamic home page. I would like to add more of these front page sections, and have seven. But I don't see how that can be customized. It seems like five is the maximum. Anyone know to add more. Thanks in advance for the help. Site is: http://www.aaronwjohnston.com

    Aaron

    http://www.aaronwjohnston.com
    October 14, 2018 at 2:51 am #223730
    Victor Font
    Moderator

    I originally wrote this article for the News Pro theme, but the process is the same for any Genesis/Studio Press theme: https://victorfont.com/add-widget-areas-to-news-pro-theme/


    Regards,

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

    October 16, 2018 at 4:25 pm #223789
    authorpronewbie
    Member

    Thanks for the reply, Victor. Very kind. Your solution looks a little advanced for me, so frankly I'm afraid to try. But I will definitely investigate it further and respond back here if I can get it to work out. Thank you!

    October 17, 2018 at 3:14 am #223799
    andytc
    Participant

    It's a 15 minute job , you'll need to access only 2 files in the author-pro theme DIR (not genesis dir)

    www.yoursite-name/wp-content/themes/author-pro/

    functions.php
    front-page.php

    The line numbers assume that you haven't made any edits to these files previously, if you have just look for the code sections.

    Open up functions.php

    Find line 234 of function.php and right after that line add the code below on a new line (it's at the very end , there's nothing after it)

    genesis_register_sidebar( array(
    	'id'          => 'front-page-6',
    	'name'        => __( 'Front Page 6', 'author-pro' ),
    	'description' => __( 'This is the front page 6 section.', 'author-pro' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-7',
    	'name'        => __( 'Front Page 7', 'author-pro' ),
    	'description' => __( 'This is the front page 7 section.', 'author-pro' ),
    ) );

    Open up front-page.php

    Find line 21 of front-page.php and replace all of that code with the new code below - were just adding 2 new conditionals for 'is_active_sidebar' for our new widget areas. You can take a look and compare the 2 bits of code to see the very simple additions.

    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' ) || is_active_sidebar( 'front-page-6' ) || is_active_sidebar( 'front-page-7' ) ) {

    Find line 66 of front-page.php and add the code below right after the last genesis_widget_area (number 5) on a new line, take care NOT to remove the closing curly brace } at line 86 or the "// Run the Genesis loop .genesis();".

    genesis_widget_area( 'front-page-6', array(
    		'before' => '<div id="front-page-6" class="front-page-6"><div class="flexible-widgets widget-area' . author_widget_area_class( 'front-page-6' ) . '">',
    		'after'  => '</div></div>',
    	) );
    
        genesis_widget_area( 'front-page-7', array(
    		'before' => '<div id="front-page-7" class="front-page-7"><div class="flexible-widgets widget-area' . author_widget_area_class( 'front-page-7' ) . '">',
    		'after'  => '</div></div>',
    	) );

    That's it , save both files and go to widgets , you'll now see your 2 new flexible widget area's. Add your content and do your own own styling if required.

    October 17, 2018 at 3:19 am #223800
    andytc
    Participant

    It's a 15 minute job , you'll need to access only 2 files in the author-pro theme DIR (not genesis dir)

    www.yoursite-name/wp-content/themes/author-pro/

    functions.php
    front-page.php

    The line numbers assume that you haven't made any edits to these files previously, if you have just look for the code sections.

    Open up functions.php

    Find line 234 of function.php and right after that line add the code below on a new line (it's at the very end , there's nothing after it)

    genesis_register_sidebar( array(
    	'id'          => 'front-page-6',
    	'name'        => __( 'Front Page 6', 'author-pro' ),
    	'description' => __( 'This is the front page 6 section.', 'author-pro' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'front-page-7',
    	'name'        => __( 'Front Page 7', 'author-pro' ),
    	'description' => __( 'This is the front page 7 section.', 'author-pro' ),
    ) );

    Open up front-page.php

    Find line 21 of front-page.php and replace all of that code with the new code below - were just adding 2 new conditionals for 'is_active_sidebar' for our new widget areas. You can take a look and compare the 2 bits of code to see the very simple additions.

    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' ) || is_active_sidebar( 'front-page-6' ) || is_active_sidebar( 'front-page-7' ) ) {

    Find line 66 of front-page.php and add the code below right after the last genesis_widget_area (number 5), take care not to remove the closing curly brace } at line 86 or the "// Run the Genesis loop .genesis();".

    genesis_widget_area( 'front-page-6', array(
    		'before' => '<div id="front-page-6" class="front-page-6"><div class="flexible-widgets widget-area' . author_widget_area_class( 'front-page-6' ) . '">',
    		'after'  => '</div></div>',
    	) );
    
        genesis_widget_area( 'front-page-7', array(
    		'before' => '<div id="front-page-7" class="front-page-7"><div class="flexible-widgets widget-area' . author_widget_area_class( 'front-page-7' ) . '">',
    		'after'  => '</div></div>',
    	) );

    That's it , save both files and go to widgets , you'll now see your 2 new flexible widget area's. Add your content and do your own own styling if required.

    October 17, 2018 at 10:06 am #223808
    authorpronewbie
    Member

    Holy moly!!! This worked. Thank you, andytc. You are my hero. How kind of you to take the time to show me how to do this. Very kind. Thank you. It works perfectly!

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Want to add more Front Page Widget areas To Author Pro’ 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