• Resolved RJ_Dev

    (@rj_dev)


    I’ve installed Custom Sidebars. I’m using a custom theme, initially I had only one Primary-Sidebar and Custom Sidebars worked perfectly, I created various types of Sidebars under Primary Sidebar so I could implement different contents for different pages but when I created another sidebar area (A Slider Area above Footer) it isn’t working like the Primary Sidebar, I mean when I open a Page to edit, I can see the Custom Sidebars Option but I only see an option to change Primary Sidebar, I was expecting another dropdown menu option under the label Aside Slider but I don’t see that option.

    Here is my Functions.php code to register sidebar:-

    /* REGISTER SIDEBAR */
    if (function_exists('register_sidebar') ) {
    	register_sidebar(array(
    	'name' => 'Primary Sidebar',
    	'id' => 'sidebar-one',
    	'before_widget' => '<section id="%1$s" class="%2$s">',
    	'after_widget' => '</section>',
    	'before_title' => '<span class="widget-title">',
    	'after_title' => '</span>'
    ));
    }
    
    if (function_exists('register_sidebar') ) {
    	register_sidebar(array(
    		'name' => 'Aside Slider',
    		'id' => 'aside-slider',
    	));
    }

    the code in index.php to get the sidebars:-

    <?php dynamic_sidebar('sidebar-one'); ?>
    <?php dynamic_sidebar('aside-slider'); ?>

    https://wordpress.org/plugins/custom-sidebars/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Multiple Sidebars on a Single Page’ is closed to new replies.