0
votes

In this site (http://tarjom.ir/demo/pwp/) on the left side there is a sidebar titled Left Side Bar.

I need to know how to register that sidebar so to be used as a widgetized sidebar. I have read some documentation and have tried a bunch of ways, but still fail to do so. I appreciate if any one help me in this issue.

thanks in advance

EDITED

this is the code that I have tried:

function sidebar_widget() {

    register_sidebar(array(
  'name' => __( 'Right Hand Sidebar' ),
  'id' => 'left-sidebar-login',
  'description' => __( 'ThemeMyLogin Widget Area' ),
  'before_title' => '<h1>',
  'after_title' => '</h1>'
));
}
add_action( 'widgets_init', 'sidebar_widget' );

I have tried the above code, it is added to the widget drag-and-drop panel, but nothing changes in the page when I add widget. The sidebar still remains empty.

1
Have you looked at the register_sidebar function? codex.wordpress.org/Function_Reference/register_sidebar - Martin Bean
Might help if you post what you've tried. - Amal Murali
I have edited and added the code - Mostafa Talebi
yes I have taken a look and also have used the suggested snippet, but still fail - Mostafa Talebi

1 Answers

0
votes

Try this

if ( function_exists('register_sidebar') )
    register_sidebar(array(
      'name' => __( 'Right Hand Sidebar' ),
      'id' => 'left-sidebar-login',
      'description' => __( 'ThemeMyLogin Widget Area' ),
      'before_title' => '<h1>',
      'after_title' => '</h1>'
    ));