Support » Plugin: Content Aware Sidebars - Unlimited Widget Areas » Adding Sidebar to Theme without Sidebars

  • Resolved annaslipp


    I have a theme that I really like for my blog (, but it has no sidebars. I’m hoping to use this plug-in to add a news roll of updates from FDA on the home/landing page of the blog. I used this plug-in for a different site, which had header and footer navigation “sidebars”, which I could “replace” with your plug-in sidebars, but I don’t have that option with this theme for some reason. The header/footer areas are only for menus/navigation, and there is literally no place to add widgets.

    Is there a way to use this plug-in if there is no built-in sidebar, header or footer area, which accepts widgets? If so, please advise. My coding ability is limited, at best, so if I need to adjust the css, please be specific about what needs to go where in the theme editor.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joachim Jensen


    There are two possibilites to solve this:

    1. You create and insert ordinary sidebars in your theme and uses Content Aware Sidebars to merge with or replace these sidebars.

    2. You insert display_ca_sidebar( $args ) in your theme to create content aware sidebars that are handled manually (i.e. they do not replace or merge with other sidebars).

    I would suggest option 1, but let me know which one you choose and I’ll help you further.



    Option one sounds preferable. This plug-in is brilliant on the theme I have that has a built-in side bar, so just replicating that format would be wonderful.

    I’ve searched the wordpress codex to find “how to add sidebar” links, but it assumes that the person reading the proposed code knows where to actually insert the code. (I can make minor code/template changes, but only to things like color, margin, padding, etc.)

    Any thoughts you may have would be very helpful.

    Thank you again! – Anna

    Plugin Author Joachim Jensen


    In the Theme Editor, go to Theme Functions and insert the following:

    add_action( 'widgets_init', 'my_register_sidebars' );
    function my_register_sidebars() {
    			'id' => 'primary',
    			'name' => __( 'Primary' ),
    			'before_widget' => '<div id="%1$s" class="widget %2$s">',
    			'after_widget' => '</div>',
    			'before_title' => '<h3 class="widget-title">',
    			'after_title' => '</h3>'

    Notice that you can alter the HTML in the properties.

    In the Theme Template where you want to insert the sidebar, e.g. in the footer, insert the following at the preferred spot:

    <?php if(is_active_sidebar('primary')) : ?>
    <div id="sidebar">
    <?php dynamic_sidebar('primary'); ?>
    <?php endif; ?>

    Again, you can change the HTML.

    Go to the Controlpanel > Widgets and drag some widgets to the sidebar so that it becomes active and you can style it with CSS.

    Now you can create new content aware sidebars that use this sidebar as a host.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding Sidebar to Theme without Sidebars’ is closed to new replies.