Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'genesis_meta', 'goinggreen_home_genesis_meta' );
- /**
- * Add widget support for homepage. If no widgets active, display the default loop.
- *
- */
- function goinggreen_home_genesis_meta() {
- if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) {
- remove_action( 'genesis_loop', 'genesis_do_loop' );
- add_action( 'genesis_loop', 'goinggreen_home_featured' );
- add_action( 'genesis_before_footer', 'goinggreen_home_sections', 3 );
- add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
- add_filter( 'body_class', 'add_body_class' );
- function add_body_class( $classes ) {
- $classes[] = 'goinggreen';
- return $classes;
- }
- }
- }
- function goinggreen_home_featured() {
- if ( is_active_sidebar( 'home-featured' ) ) {
- genesis_widget_area( 'home-featured', array(
- 'before' => '<div class="home-featured widget-area">'
- ) );
- }
- }
- remove_action( 'genesis_loop', 'genesis_do_loop' );
- genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement