Created
April 18, 2017 23:04
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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