Community Forums › Forums › Archived Forums › Design Tips and Tricks › Home Top Widget area not working
- This topic has 3 replies, 2 voices, and was last updated 10 years, 6 months ago by kimberlymwhd.
-
AuthorPosts
-
July 8, 2014 at 12:06 pm #113443kimberlymwhdMember
Hey, for some reason the Home Top widget area of my template is not working? It's supposed to show my Genesis slider above the content in the right side of my blog. I'm going to include my functions.php coding. Don't know what I'm missing... help!
<?php
/** Start the engine **/
require_once( TEMPLATEPATH . '/lib/init.php' );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Blissful Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/blissful' );/** Add support for custom background */
add_custom_background();/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 120 ) );/** Unregister 3-column site layouts */
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );/** Add new image sizes */
add_image_size( 'mini-thumbnail', 75, 75, TRUE );
add_image_size( 'small-thumbnail', 110, 110, TRUE );/** Reposition the Primary Navigation */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );add_filter( 'genesis_post_info', 'blissful_post_info_filter' );
/**
* Customize the post info function
*/
function blissful_post_info_filter( $post_info ) {
return g_ent( '[post_date] by [post_author_posts_link] · [post_comments] [post_edit]' );
}add_filter( 'genesis_post_meta', 'blissful_post_meta_filter' );
/**
* Customize the post meta function
*/
function blissful_post_meta_filter($post_meta) {
return g_ent( '[post_categories] · [post_tags]' );
}add_filter( 'genesis_author_box_gravatar_size', 'blissful_gravatar_size' );
/**
* Modify the size of the Gravatar in the author box
*/
function blissful_gravatar_size( $size ) {
return 78;
}add_action( 'genesis_after_sidebar_widget_area', 'blissful_split_sidebars' );
/**
* Add split sidebars underneath the primary sidebar
*/
function blissful_split_sidebars() {
foreach ( array( 'sidebar-split-left', 'sidebar-split-right', 'sidebar-split-bottom' ) as $area ) {
echo '<div class="' . $area . '">';
dynamic_sidebar( $area );
echo '</div><!-- end #' . $area . '-->';
}
}add_filter( 'genesis_footer_backtotop_text', 'blissful_footer_backtotop_filter' );
/**
* Customizes go to top text
*/
function blissful_footer_backtotop_filter( $backtotop ) {
return '[footer_backtotop text="Top of Page"]';
}/** Register widget areas */
http://www.vendors.barnsalebusiness.com/
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home Top', 'blissful' ),
'description' => __( 'This is the top section of the homepage', 'blissful' ),
) );
genesis_register_sidebar( array(
'id' => 'sidebar-split-left',
'name' => __( 'Sidebar Split Left', 'blissful' ),
'description' => __( 'This is the left side of the split sidebar', 'blissful' ),
) );
genesis_register_sidebar( array(
'id' => 'sidebar-split-right',
'name' => __( 'Sidebar Split Right', 'blissful' ),
'description' => __( 'This is the right side of the split sidebar', 'blissful' ),
) );
genesis_register_sidebar( array(
'id' => 'sidebar-split-bottom',
'name' => __( 'Sidebar Split Bottom', 'blissful' ),
'description' => __( 'This is the bottom of the split sidebar', 'blissful' ),
) );July 8, 2014 at 6:04 pm #113498ᴅᴀᴠɪᴅMemberYou haven't hooked the widget on to anywhere. You have registered the home-top widget, but now you need to put it somewhere.
eg
add_action( ‘genesis_after_header’, ‘blissful_home_top_widget’ );
/**
* Add home top widget
*/
function blissful_home_top_widget() {
genesis_widget_area( ‘home-top’, array(
‘before’ => ‘<div id=”home-top” class=”home-top”><div class=”wrap”>’,
‘after’ => ‘</div></div>’,
) );
}just change the genesis_after_header to whichever hook you need to use, depending on where you need the widget area to display
I love helping creative entrepreneurs build epic things with WP & Genesis.
July 9, 2014 at 6:35 am #113543kimberlymwhdMemberWhere does that get placed David Browne? Bc when I copied and pasted it at the bottom of my functions.php it made my website go white
July 9, 2014 at 7:07 am #113548kimberlymwhdMemberThis is the website that helped me figure this out.... the home top instructions are at the bottom:
http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar
-
AuthorPosts
- The topic ‘Home Top Widget area not working’ is closed to new replies.