Custom widget sidebar
-
Hello All, I have created a custom widget for the sidebar and I would like to know how can i change the location of the sidebar where I want to.
add_action( 'widgets_init', 'my_register_sidebars' ); function my_register_sidebars() { /* Register the 'primary' sidebar. */ register_sidebar( array( 'id' => 'primary', 'name' => __( 'Primary Sidebar' ), 'description' => __( 'Sidebar is for recent statistics' ), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); /* Repeat register_sidebar() code for additional sidebars. */ }
this is the code i used in order to create my sidebar
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom widget sidebar’ is closed to new replies.