Menu
Active4 years, 4 months ago
i am trying to add
ham-sandwichmultiple widgets area
, the code below i have posted is to add multiple widgets. it works, but the name of second sidebar
repeats two time. is any solution for it ?3,43988 gold badges2424 silver badges3838 bronze badges
Manoj SinghManoj Singh
3 Answers
Lets go through the simple process of adding a custom widget area anywhere in WordPress. We’ll register the new widget; Then hook the new widget to any of the Genesis theme hook locations; 1. Register New Widget. All you need to do is add some php code to your child themes functions.php file. Below is the code to register and display a new custom widget area in Genesis.
this code looks like you register three sidebar 1. wpwidget 2. wpwidget2 3. the same wpwidget2
if you trying to add 2 sidebar then write this code
sprytechiessprytechies
register_sidebars
registers multiple sidebars and you've provided 2
as an argument for the second function that's why it is registering two sidebars.In your case it would be a better idea to use
register_sidebar
.Reference:
http://codex.wordpress.org/Function_Reference/register_sidebar
http://codex.wordpress.org/Function_Reference/register_sidebars
6,18044 gold badges2828 silver badges4242 bronze badges
In the following code i am adding code to create custom Multiple Widget or sidebar in the wordpress.
I think that would help me for any other question contact me
Sandeep KumarSandeep Kumar