Hi @rj_dev.
Greetings and thanks for posting on the forums.
I tried using the default Twenty Thirteen theme on my test site & the code you have provided and it worked fine without any issue.
Make sure you have selected ‘Aside Slider’ and ‘Primary Sidebar’ from the Replaceable Sidebars list on the following path in the Custom Sidebars settings.
Admin area -> Appearance -> Custom sidebars -> Custom Sidebars Tab -> Select the boxes available for substitution
Is it working fine for you using default WordPress theme like Twenty Thirteen?
Kind Regards,
WPMU DEV
Thread Starter
RJ_Dev
(@rj_dev)
Hi WPMU DEV,
Thanks for helping me out, please check out the screenshots in the following link you’ll get a better understanding of the issue.
https://www.dropbox.com/sh/3f0wdd3e0hgion5/AAB0kVCjt3ST21ahKK8yEGZSa
Regards,
Raj
Hi Raj,
Thank you for your reply and sharing the screenshots.
I checked the shared screenshots and found the issue that you have only selected “Primary Sidebar” as replaceable sidebar and not “Aside Slider” sidebar as shown in this screenshot.
Please also select the “Aside Slider” sidebar in the replaceable sidebars area by pressing CTRL key as displayed in this screenshot.
Best Regards,
WPMU DEV
Thread Starter
RJ_Dev
(@rj_dev)
Thank You So Much WPMU DEV, that worked perfectly, thanks for your time.
For those who are facing similar problem, I’ll explain it in a bit more detail, basically the Custom Sidebars works only when each sidebar area is assigned a default sidebar content. So the process is:-
Step 1:- Register the Sidebar areas in functions.php
<?php
if (function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Primary Sidebar',
'id' => 'primary-sidebar',
));
}
?>
Step 2:- In Appearance > Widgets – Create some widgets for the sidebar with the desired contents.
Step 3:- In Appearance > Custom Sidebars:- The registered sidebar area will appear on the left column, select it first and then click on DEFAULT SIDEBARS tab > Click on By Post Type > Click on PAGES > Select a Sidebar Content (A widget created in Step 2) as default one.
Step 4: – When you create another sidebar area, follow the previous steps, only in Step 3, in the CUSTOM SIDEBARS tab, select all the sidebar areas first > then click DEFAULT SIDEBARS > Click on By Post Type > Click on PAGES > Select a Sidebar Content as default one.
Step 5:- Obviously you need different Default Sidebar contents for different sidebar areas, after Step 4, go again to DEFAULT SIDEBARS tab, now the second Sidebar Area will appear along with an option to set a default content.
That’s It!
Regards,
Raj
You are most welcome, if I can be of any further assistance please don’t hesitate to ask 🙂