updated with new widget functions.

This commit is contained in:
Jacob Haddon 2020-11-19 21:15:19 -05:00
parent abc5cb369d
commit 23bb31595c
2 changed files with 37 additions and 3 deletions

View File

@ -67,7 +67,8 @@ function melville_setup() {
// This theme uses wp_nav_menu() in one locations. // This theme uses wp_nav_menu() in one locations.
register_nav_menus( array( register_nav_menus( array(
'header-menu' => __( 'Header Menu', 'twentyten'), 'header-menu' => __( 'Header Menu', 'twentyten'),
'footer-menu' => __( 'Footer Menu', 'twentyten' ) 'footer-menu' => __( 'Footer Menu', 'twentyten' ),
'slidedown-menu' => __( 'SlideDown Menu', 'twentyten' )
) ); ) );
} }
endif; endif;
@ -377,6 +378,39 @@ function melville_widgets_init() {
'after_title' => '</h3>', 'after_title' => '</h3>',
) )
); );
// Area 5, located in the popout. Empty by default.
register_sidebar(
array(
'name' => __( 'First Slidedown Widget Area', 'twentyten' ),
'id' => 'first-slidedown-widget-area',
'description' => __( 'An optional widget area for your site sidedown.', 'twentyten' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
)
);
// Area 6, located in the popout. Empty by default.
register_sidebar(
array(
'name' => __( 'Second Slidedown Widget Area', 'twentyten' ),
'id' => 'second-slidedown-widget-area',
'description' => __( 'An optional widget area for your site slidedown.', 'twentyten' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
)
);
} }
/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */ /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
add_action( 'widgets_init', 'melville_widgets_init' ); add_action( 'widgets_init', 'melville_widgets_init' );

View File

@ -127,8 +127,8 @@ jQuery(document).ready(function(){
<div class="bar2"></div> <div class="bar2"></div>
<div class="bar3"></div></div> <div class="bar3"></div></div>
<div id="panel"> <div id="panel">
<?php wp_nav_menu( array( 'container_class' => 'melville_header_menu', 'theme_location' => 'header-menu' ) ); ?> <?php wp_nav_menu( array( 'container_class' => 'melville_header_menu', 'theme_location' => 'slidedown-menu' ) ); ?>
<?php get_sidebar( 'slidedown' ); ?>
<div style="clear: both"></div> <div style="clear: both"></div>
</div> </div>