Custom Wordpress Sidebar

if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Chassis Sidebar', 'id' => 'chassis-sidebar', 'description' => 'These are widgets for the About sidebar.', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } /**Add this where the sidebar will be displayed**/ <?php get_sidebar('media'); ?> /**Change "Projects" to whatever the name of the sidebar is**/ <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Projects Sidebar')) : else : ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.