• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

PopWP

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Register Multiple Widgets area in Genesis

Last Updated on June 15, 2018 Favorited: 0 times

This is Step 1. Don’t forget to follow >> Step 2. Display Multiple Widgets area in Genesis

The snippet should be added in child theme’s functions.php

//* Register front-page widget areas
genesis_register_widget_area(
	array(
		'id'          => "front-page-1",
		'name'        => __( "Front Page 1", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 1 section.", 'my-theme-text-domain' ),
	)
);

genesis_register_widget_area(
	array(
		'id'          => "front-page-2",
		'name'        => __( "Front Page 2", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 2 section.", 'my-theme-text-domain' ),
	)
);

genesis_register_widget_area(
	array(
		'id'          => "front-page-3",
		'name'        => __( "Front Page 3", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 3 section.", 'my-theme-text-domain' ),
	)
);

genesis_register_widget_area(
	array(
		'id'          => "front-page-4",
		'name'        => __( "Front Page 4", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 4 section.", 'my-theme-text-domain' ),
	)
);

genesis_register_widget_area(
	array(
		'id'          => "front-page-5",
		'name'        => __( "Front Page 5", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 5 section.", 'my-theme-text-domain' ),
	)
);

genesis_register_widget_area(
	array(
		'id'          => "front-page-6",
		'name'        => __( "Front Page 6", 'my-theme-text-domain' ),
		'description' => __( "This is the front page 6 section.", 'my-theme-text-domain' ),
	)
);

or, We can simply use

//* Register front-page widget areas
for ( $i = 1; $i <= 6; $i++ ) {
	genesis_register_widget_area(
		array(
			'id'          => "front-page-{$i}",
			'name'        => __( "Front Page {$i}", 'my-theme-text-domain' ),
			'description' => __( "This is the front page {$i} section.", 'my-theme-text-domain' ),
		)
	);
}

Next, Step 2. Display Multiple widget area in Genesis

Source: https://sridharkatakam.com/simplifying-code-registering-multiple-widget-areas-genesis/

Categories: Free Content, Genesis Tutorials

Reader Interactions

Primary Sidebar

Search

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service