Community Forums › Forums › Archived Forums › General Discussion › Enterprise Pro widget area visual hook error
Tagged: visual hook, widget area
- This topic has 1 reply, 2 voices, and was last updated 9 years, 3 months ago by Susan.
-
AuthorPosts
-
December 10, 2014 at 9:09 am #133943aperichMember
Hi guys,
I'm having some issues with Enterprise-Pro visual hook where the add_theme_support( 'genesis-footer-widgets', 3 ); displays above my home-content widget area where the visual hook is placed 'genesis_before_footer'. For some reason this footer widget displays above the genesis-footer-widget area. I have looked at another website built and it displays below the ( 'genesis-footer-widgets', 3 ); .
Code from functions.php
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Setup Theme
include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'enterprise', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'enterprise' ) );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Enterprise Pro Theme', 'enterprise' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/enterprise/' );
define( 'CHILD_THEME_VERSION', '2.1.1' );//* Add HTML5 markup structure
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'enterprise_load_scripts' );
function enterprise_load_scripts() {wp_enqueue_script( 'enterprise-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_style( 'dashicons' );
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700,300italic|Titillium+Web:600', array(), CHILD_THEME_VERSION );
}
//* Add new image sizes
add_image_size( 'featured-image', 358, 200, TRUE );
add_image_size( 'home-top', 750, 600, TRUE );//* Add support for custom header
add_theme_support( 'custom-header', array(
'header-selector' => '.site-title a',
'header-text' => false,
'height' => 80,
'width' => 320,
) );//* Add support for additional color style options
add_theme_support( 'genesis-style-selector', array(
'enterprise-pro-black' => __( 'Enterprise Pro Black', 'enterprise' ),
'enterprise-pro-green' => __( 'Enterprise Pro Green', 'enterprise' ),
'enterprise-pro-orange' => __( 'Enterprise Pro Orange', 'enterprise' ),
'enterprise-pro-red' => __( 'Enterprise Pro Red', 'enterprise' ),
'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ),
) );//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'site-inner',
'footer-widgets',
'footer',
) );//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_footer', 'genesis_do_subnav', 7 );//* Reduce the secondary navigation menu to one level depth
add_filter( 'wp_nav_menu_args', 'enterprise_secondary_menu_args' );
function enterprise_secondary_menu_args( $args ){if( 'secondary' != $args['theme_location'] )
return $args;$args['depth'] = 1;
return $args;}
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'enterprise_remove_comment_form_allowed_tags' );
function enterprise_remove_comment_form_allowed_tags( $defaults ) {$defaults['comment_notes_after'] = '';
return $defaults;}
//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );
//* Add support for after entry widget
add_theme_support( 'genesis-after-entry-widget-area' );//* Relocate after entry widget
remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'enterprise' ),
'description' => __( 'This is the top section of the homepage.', 'enterprise' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home - Bottom', 'enterprise' ),
'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ),
) );genesis_register_sidebar( array(
'id' => 'home-content',
'name' => __( 'home-content', 'enterprise' ),
'description' => __( 'This is the content section of the homepage', 'enterprise' ),
) );add_filter( 'woocommerce_product_tabs', 'sb_woo_remove_reviews_tab', 98);
function sb_woo_remove_reviews_tab($tabs) {unset($tabs['reviews']);
return $tabs;
}remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
// hide coupon form everywhere
function hide_coupon_field( $enabled ) {if ( is_cart() || is_checkout() ) {
$enabled = false;
}return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field' );add_theme_support( 'genesis-connect-woocommerce' );
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );
}
/**
* Place a cart icon with number of items and total cost in the menu bar.
*
* Source: http://wordpress.org/plugins/woocommerce-menu-bar-cart/
*/
add_filter('wp_nav_menu_items','sk_wcmenucart', 10, 2);
function sk_wcmenucart($menu, $args) {// Check if WooCommerce is active and add a new item to a menu assigned to Primary Navigation Menu location
if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || 'primary' !== $args->theme_location )
return $menu;ob_start();
global $woocommerce;
$viewing_cart = __('View your shopping cart', 'your-theme-slug');
$start_shopping = __('Start shopping', 'your-theme-slug');
$cart_url = $woocommerce->cart->get_cart_url();
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
$cart_contents_count = $woocommerce->cart->cart_contents_count;
$cart_contents = sprintf(_n('%d item', '%d items', $cart_contents_count, 'your-theme-slug'), $cart_contents_count);
$cart_total = $woocommerce->cart->get_cart_total();
// Uncomment the line below to hide nav menu cart item when there are no items in the cart
// if ( $cart_contents_count > 0 ) {
if ($cart_contents_count == 0) {
$menu_item = '<li class="right">';
} else {
$menu_item = '<li class="right">';
}$menu_item .= '<i class="fa fa-shopping-cart"></i> ';
$menu_item .= $cart_contents.' - '. $cart_total;
$menu_item .= '';
// Uncomment the line below to hide nav menu cart item when there are no items in the cart
// }
echo $menu_item;
$social = ob_get_clean();
return $menu . $social;}
//* Customize the entire footer
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'sp_custom_footer' );function sp_custom_footer() {
?>
<p>© Copyright 2014 Ensure Safety · All Rights Reserved · Designed by WebSmart · Admin <br /> Privacy Policy · Contact Us</p>
<?php
}add_action( 'wp_enqueue_scripts', 'add_dashicons_front_end' );
function add_dashicons_front_end() {
wp_enqueue_style( 'dashicons-style', get_stylesheet_uri(), array('dashicons'), '1.0' );
}
/* Disable Related products on single product pages */
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products',20);remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 50;' ), 20 );
code from : front-page.php
<?php
/**
* This file adds the Home Page to the Enterprise Pro Theme.
*
* @author StudioPress
* @package Enterprise Pro
* @subpackage Customizations
*/add_action( 'genesis_meta', 'enterprise_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function enterprise_home_genesis_meta() {if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-bottom' ) || is_active_sidebar ('home-content') ){
//* Force full-width-content layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );//* Add enterprise-pro-home body class
add_filter( 'body_class', 'enterprise_body_class' );//* Remove the default Genesis loop
remove_action( 'genesis_loop', 'genesis_do_loop' );//* Add home top widgets
add_action( 'genesis_after_header', 'enterprise_home_top_widgets' );//* Add home bottom widgets
add_action( 'genesis_loop', 'enterprise_home_bottom_widgets' );//* Add home content widgets
add_action( 'genesis_before_footer', 'enterprise_home_content_widgets' );}
}function enterprise_body_class( $classes ) {
$classes[] = 'enterprise-pro-home';
return $classes;}
function enterprise_home_top_widgets() {
genesis_widget_area( 'home-top', array(
'before' => '<div class="home-top widget-area"><div class="temp-wrap">',
'after' => '</div></div>',
) );}
function enterprise_home_bottom_widgets() {
genesis_widget_area( 'home-bottom', array(
'before' => '<div class="home-bottom widget-area">',
'after' => '</div>',
) );}
function enterprise_home_content_widgets() {
genesis_widget_area( 'home-content', array(
'before' => '<div class="wrap"><div class="home-content widget-area">',
'after' => '</div></div>',
) );}
genesis();
code from page_landing:
<?php
/**
* This file adds the Landing template to the Enterprise Pro Theme.
*
* @author StudioPress
* @package Enterprise Pro
* @subpackage Customizations
*//*
Template Name: Landing
*///* Add custom body class to the head
add_filter( 'body_class', 'enterprise_add_body_class' );function enterprise_add_body_class( $classes ) {
$classes[] = 'enterprise-pro-landing';
return $classes;}
//* Force full width content layout
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );//* Remove site header elements
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header', 10 );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );//* Remove navigation
remove_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_footer', 'genesis_do_subnav', 7 );//* Remove breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );//* Remove sub-footer widgets
remove_action( 'genesis_before_footer', 'outreach_sub_footer', 5 );//* Remove site footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );//* Remove site footer elements
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );//* Run the Genesis loop
genesis();Could someone please help me in solving this issue. Also the website is on maintenance mode and isnt running live.
Here is a URL to an image i screen grabbed:
http://tinypic.com/r/2a00vwo/8Regards,
Adam
January 20, 2015 at 10:22 am #138061SusanModeratorAs you posted this a while ago, I hope you were able to get your issue resolved. If it was resolved, please mark the thread “resolved”, so that it can be closed.
If it is not resolved, please check back in, and I will try to escalate for you.
Thanks!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.