Title: Adding Sidebar to Theme without Sidebars
Last modified: August 20, 2016

---

# Adding Sidebar to Theme without Sidebars

 *  Resolved [annaslipp](https://wordpress.org/support/users/annaslipp/)
 * (@annaslipp)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/adding-sidebar-to-theme-without-sidebars/)
 * I have a theme that I really like for my blog (www.pethealthadvocate.me), 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!
 * [http://wordpress.org/extend/plugins/content-aware-sidebars/](http://wordpress.org/extend/plugins/content-aware-sidebars/)

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

 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/adding-sidebar-to-theme-without-sidebars/#post-3145407)
 * 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.
 *  Thread Starter [annaslipp](https://wordpress.org/support/users/annaslipp/)
 * (@annaslipp)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/adding-sidebar-to-theme-without-sidebars/#post-3145426)
 * 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](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/adding-sidebar-to-theme-without-sidebars/#post-3145483)
 * In the Theme Editor, go to Theme Functions and insert the following:
 *     ```
       add_action( 'widgets_init', 'my_register_sidebars' );
       function my_register_sidebars() {
       	register_sidebar(
       		array(
       			'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">
       <ul>
       <?php dynamic_sidebar('primary'); ?>
       </ul>
       </div>
       <?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.

 * ![](https://ps.w.org/content-aware-sidebars/assets/icon-256x256.png?rev=1815877)
 * [Content Aware Sidebars - Fastest Widget Area Plugin](https://wordpress.org/plugins/content-aware-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-aware-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-aware-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/content-aware-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-aware-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-aware-sidebars/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/adding-sidebar-to-theme-without-sidebars/#post-3145483)
 * Status: resolved