creating a left-side sidebar in word press [closed]

  1. Register a sidebar in your functions.php using register_sidebar.
  2. Put some widgets in your sidebar from the dashboard (Appearance/Widgets).
  3. Show the sidebar on specific pages on your website by using dynamic_sidebar in your php code. Or you can create a sidebar-{your-sidebar-id}.php file and use get_sidebar to show the sidebar wherever you want.
  4. Use CSS / HTML to style your sidebar to appear on the left.

A working example:

functions.php

register_sidebar(array(
    'name' => 'sidebar-left',
    'before_widget' => '<div class="sidebar-box">',
    'after_widget' => '</div>',
    'before_title' => '<div class="widget-title">',
    'after_title' => '</div>'
    ));

sidebar-left.php

<div id="sidebar-left">
    <?php if ( function_exists('dynamic_sidebar') ) dynamic_sidebar('sidebar-left');?>
</div>

style.css

#sidebar-left { float: left; width: 300px; }
// modify to your needs.

// Example to show sidebar on the homepage
index.php

<?php get_header();?>
// your code
// more of your  code
<?php get_sidebar('left');?>
<?php get_footer();?>