• Skip to main content

Victor Font Consulting Group, LLC

The DEX Intranet Specialists

Call Us:

+1 919-604-5828

  • Home
  • Care Plans
    • Care Articles
    • Optional Subscriptions
  • Consultations
  • Products
    • Code Snippets
    • Public GitHub Repositories
    • Gist Snippets
    • Pastebin Snippets (Free)
    • Free Plugins
  • FAQs
  • Support
    • Graphic Design
  • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network
You are here: Home / Computers and Internet / Programming / WordPress / Child Themes / Add Widget Areas to News Pro Theme

Add Widget Areas to News Pro Theme

By Victor M. Font Jr.
September 28, 20153 Comments

Add Widget Areas to News Pro Theme, public domain image courtesy of pixabay.com
A user writes:

Is it possible for me to achieve the following with the News Pro theme?

  1. Add a Home Center widget area below the Home Left and Home Right which would cover the whole length of the above two widgets combined
  2. Repeat the Home Left and Home Right widget just below the Home Center widget

Yes, not only is it possible, this is the same process to follow for any Studio Press theme.

First you need to register the widget areas. Add this to functions.php:

genesis_register_sidebar( array(
	'id'          => 'home-center',
	'name'        => __( 'Home - center', 'news' ),
	'description' => __( 'This is the center section of the homepage.', 'news' ),
) );
genesis_register_sidebar( array(
	'id'          => 'home-middle-left-2',
	'name'        => __( 'Home - Middle Left 2', 'news' ),
	'description' => __( 'This is the second middle left section of the homepage.', 'news' ),
) );
genesis_register_sidebar( array(
	'id'          => 'home-middle-right-2',
	'name'        => __( 'Home - Middle Right 2', 'news' ),
	'description' => __( 'This is the second middle right section of the homepage.', 'news' ),
) );

Next, you have to modify the home page. Open front-page.php and replace it with this code:

 '
', 'after' => '
', ) ); } function news_homepage_widgets() { if ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) ) { echo '
'; genesis_widget_area( 'home-middle-left', array( 'before' => '
', 'after' => '
', ) ); genesis_widget_area( 'home-middle-right', array( 'before' => '
', 'after' => '
', ) ); echo '
'; } if ( is_active_sidebar( 'home-center' ) ) { genesis_widget_area( 'home-center', array( 'before' => '
', 'after' => '
', ) ); } if ( is_active_sidebar( 'home-middle-left-2' ) || is_active_sidebar( 'home-middle-right-2' ) ) { echo '
'; genesis_widget_area( 'home-middle-left-2', array( 'before' => '
', 'after' => '
', ) ); genesis_widget_area( 'home-middle-right-2', array( 'before' => '
', 'after' => '
', ) ); echo '
'; } genesis_widget_area( 'home-bottom', array( 'before' => '
', 'after' => '
', ) ); } genesis();

Last you have to apply the CSS.

Find the classes for the home page in style.css around line 1287 and replace them with this:

/* Home Page
--------------------------------------------- */

.home-top {
	background-color: #f3f3f3;
	border-bottom: 1px solid #e3e3e3;
	clear: both;
	padding: 20px 20px 0;
}

.home-top .featured-content .entry-title {
	font-size: 30px;
}

.home-middle-left,
.home-middle-left-2 {
	border-right: 1px solid #e3e3e3;	
	float: left;
	padding: 20px 20px 0;
	width: 50%;
}

.home-middle-right,
.home-middle-right-2 {
	float: right;
	padding: 20px 20px 0;
	width: 50%;
}

.home-bottom,
.home-center {
	border-top: 1px solid #e3e3e3;
	clear: both;
	padding: 20px 20px 0;
}
  • 14shares
  • Facebook0
  • Twitter0
  • Pinterest0
  • LinkedIn14
  • Print
  • SMS0

About Victor M. Font Jr.

Victor M. Font Jr. is an award winning author, entrepreneur, and Senior IT Executive. A Founding Board Member of the North Carolina Executive Roundtable, he has served on the Board of Advisors, of the North Carolina Technology Association, the International Institute of Business Analysis, Association of Information Technology Professionals, Toastmasters International, and the North Carolina Commission for Mental Health, Developmental Disabilities, and Substance Abuse Services. He is author of several books including The Ultimate Guide to the SDLC and Winning With WordPress Basics, and Cybersecurity.

Reader Interactions

VictorFont.com runs on the Genesis Framework

Genesis FrameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple—start using Genesis now!

Click here to download The Genesis Guide for Absolute Beginners (PDF - 1.4 MB)

Leave a Reply Cancel reply

Your email address and website will not be published. Required fields are marked *
Posting a comment means that you agree with and accept our Comment & Product Review Policy

Comments

  1. Dattaraj Vidyasagar

    November 17, 2018 at 5:53 am

    Its a greatly written and highly elaborated post. Tons of thanks. It helped me a lot.
    God bless you….!

    Reply
  2. mike

    October 8, 2016 at 10:50 am

    Thanks for your post.
    It’s really helpful.
    Can i share this on my webiste: http://www.zetarmold.com
    Thanks

    Reply
    • Victor M. Font Jr.

      October 8, 2016 at 10:57 am

      Hi Mike,

      Thanks for asking to share the article. Please feel free to share it as long as you provide attribution to me and a link back to this site.

      Regards,
      Victor

      Reply

Call: +1 919-604-5828

Send us an E-mail

Accessibility Statement | Affiliate Marketing Disclosure | Capability Statement

Cookie Policy | Comment & Product Review Policy | Privacy Policy | Site Map | Terms & Conditions

Copyright © 2003–2023 Victor M. Font Jr.

Return to top of page