Skip to content

Instantly share code, notes, and snippets.

@topleague
Created August 31, 2017 07:33
Show Gist options
  • Save topleague/3e0e829b7e7f88894b715c0cd895786c to your computer and use it in GitHub Desktop.
Save topleague/3e0e829b7e7f88894b715c0cd895786c to your computer and use it in GitHub Desktop.
Simple Way to Register Multiple Widget Areas
// Register front-page widget areas
// Courtesy: Sidhart Katakam
for ( $i = 1; $i <= 2; $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' ),
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment