Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***********************************************************************************************/
- /* EELETE ALL SIDEBAR CONTENT AND USE '<?php get_sidebar(); ?>' . THIS WILL LOOK FOR sidebar.php file//
- FOR FOOTER SIDE OTHER TWO WIDGET USE: <?php get_sidebar('left-footer'); ?> AND <?php get_sidebar('right-footer'); ?>*/
- /***********************************************************************************************/
- /***********************************************************************************************/
- /* Add Sidebar Support in functions.php as per your html markup */
- /***********************************************************************************************/
- if (function_exists('register_sidebar')) {
- register_sidebar(
- array(
- 'name' => __('Main Sidebar', 'adaptive-framework'),
- 'id' => 'main-sidebar',
- 'description' => __('The main sidebar area', 'adaptive-framework'),
- 'before_widget' => '<div class="sidebar-widget">',
- 'after_widget' => '</div> <!-- end sidebar-widget -->',
- 'before_title' => '<h4>',
- 'after_title' => '</h4>'
- )
- );
- register_sidebar(
- array(
- 'name' => __('Left Footer', 'adaptive-framework'),
- 'id' => 'left-footer',
- 'description' => __('The left footer area', 'adaptive-framework'),
- 'before_widget' => '<div class="footer-widget span3">',
- 'after_widget' => '</div> <!-- end footer-widget -->',
- 'before_title' => '<h5>',
- 'after_title' => '</h5>'
- )
- );
- register_sidebar(
- array(
- 'name' => __('Right Footer', 'adaptive-framework'),
- 'id' => 'right-footer',
- 'description' => __('The right footer area', 'adaptive-framework'),
- 'before_widget' => '<div class="footer-widget span6">',
- 'after_widget' => '</div> <!-- end footer-widget -->',
- 'before_title' => '<h5>',
- 'after_title' => '</h5>'
- )
- );
- }
- /***********************************************************************************************/
- /* CHECK YOUR index.php/template-welcome.php deleted all html sidebar content and used 'get_sidebar()' functions.
- This function will look for sidebar.php -- So now create a sidebar.php in the theme directory and use the following code:*/
- /***********************************************************************************************/
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('main-sidebar')) : ?>
- <div class="sidebar-widget">
- <h4><?php _e('Search', 'adaptive-framework'); ?></h4>
- <?php get_search_form(); ?>
- </div> <!-- end sidebar-widget -->
- <?php endif; ?>
- /***********************************************************************************************/
- /* LIKE ABOVE, CREATE ANOTHER TWO FILE AS 'sidebar-left-footer.php' AND 'sidebar-right-footer.php'*/
- /***********************************************************************************************/
- FOR LEFT FOOTER SIDEBAR:
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('left-footer')) : ?>
- <?php endif; ?>
- FOR RIGHT FOOTER SIDEBAR:
- <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('right-footer')) : ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement