ThemeShaper Forums » Thematic

How to load a sidebar

(2 posts)
  • Started 14 years ago by riri1310
  • Latest reply from Chris
  • This topic is not resolved
  1. Hi I don't use widgets and I wonder how I can remove the thematic sidebar and how I can load my new sidebar (without the nead of the widget).

    For removing the sidebar I found : add_filter('thematic_sidebar', 'remove_sidebar');
    but I don't know how to load my code for my new sidebar.

    Thanks for your help

    henri

    Posted 14 years ago #
  2. Hi Henri,

    the easiest way is to copy sidebar.php to your child theme's directory and edit this file.

    The elegant solution would be:

    // Remove Pre-set Widgets
    $preset_widgets = array (
    	'primary-aside'  => array(),
    	'secondary-aside'  => array()
    );
    update_option( 'sidebars_widgets', $preset_widgets );
    
    function my_sidebar() {?>
    
    My HTML Code for the sidebar.
    
    <?php
    }
    add_action('thematic_abovemainasides', 'my_sidebar');

    in your child theme's functions.php.

    Chris

    Posted 14 years ago #

RSS feed for this topic

Reply

You must log in to post.