Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damiencarbery/774d75264e59581c8f529fdfaae3553f to your computer and use it in GitHub Desktop.
Save damiencarbery/774d75264e59581c8f529fdfaae3553f to your computer and use it in GitHub Desktop.
Extra widget area on home page for Enterprise Pro (question asked in Genesis WordPress group on Facebook).
<?php
/*
Plugin Name: Enterprise Pro - Extra Widget Area
Plugin URI: https://www.facebook.com/groups/genesiswp/permalink/1474446209273238/
Description: Extra widget area on home page for Enterprise Pro (question asked in Genesis WordPress group on Facebook).
Author: Damien Carbery
Author URI: http://www.damiencarbery.com
Version: 0.1
*/
add_action('genesis_setup','extra_widget_area_setup', 15);
function extra_widget_area_setup() {
genesis_register_sidebar( array(
'id' => 'home-extra',
'name' => 'Home - Extra',
'description' => 'This is the below the bottom section of the homepage.',
) );
}
add_action( 'genesis_loop', 'enterprise_home_extra_widgets', 20 );
function enterprise_home_extra_widgets() {
if ( is_front_page() ) {
genesis_widget_area( 'home-extra', array(
'before' => '<div class="home-extra widget-area">',
'after' => '</div>',
) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment