Title: Misplaced sidebar widgets
Last modified: August 24, 2016

---

# Misplaced sidebar widgets

 *  [habil66](https://wordpress.org/support/users/habil66/)
 * (@habil66)
 * [11 years ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/)
 * Updated my theme and now the sidebar widgets are placed under the products.
    
   I have woocommerce installed and I know this is causing the issues. Been looking
   around to find the problem but I cant find it so I need help.
 * I created a child theme and placed this in functions.php:
 *     ```
       remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
       remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
   
       add_action('woocommerce_before_main_content', 'fashionistas_child_wrapper_start', 10);
       add_action('woocommerce_after_main_content', 'fashionistas_child_wrapper_end', 10);
   
       function fashionistas_child_wrapper_start() {
         echo '<section id="main">';
       }
   
       function fashionistas_child_wrapper_end() {
         echo '</section>';
       }
   
       /*
        Ärver style.css från huvudtemat
       */
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
       function theme_enqueue_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
   
       }
   
       /*
        Deklarerar stöd för WooCommerce
       */
       add_action( 'after_setup_theme', 'woocommerce_support' );
       function woocommerce_support() {
           add_theme_support( 'woocommerce' );
       }
   
       ?>
       ```
   
 * and this in style.css:
 *     ```
       /*
        Theme Name:   Fashionistas Child
        Theme URI:    http://misselli.se/
        Description:  Fashionistas Child Theme
        Author:       Habil Kantur
        Author URI:   http://misselli.se
        Template:     fashionistas
        Version:      1.0.0
        License:      GNU General Public License v2 or later
        License URI:  http://www.gnu.org/licenses/gpl-2.0.html
        Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
        Text Domain:  fashionistas-child
       */
       ```
   
 * URL is [http://misselli.se](http://misselli.se)

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

 *  [Maruti Mohanty](https://wordpress.org/support/users/marutim/)
 * (@marutim)
 * [11 years ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105198)
 * Hi
 * can you check with adding a priority to the action hook
 * Change it from
 * `add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );`
 * to
 * `add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 99 );`
 *  Thread Starter [habil66](https://wordpress.org/support/users/habil66/)
 * (@habil66)
 * [11 years ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105286)
 * Nope, no change.
    Any other ideas?
 *  [Maruti Mohanty](https://wordpress.org/support/users/marutim/)
 * (@marutim)
 * [11 years ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105301)
 * Hi
 * I checked your site again, the issue is due to the change in structure you have
   made.
 * after `<div class="clearfix container">`
 * change the `<div id="container">` to `<div id="primary" class="content-area">`
 * and this will fix the issue and make sure you dont disturb the html and if you
   choose to do so, make sure you make the necessary css changes
 *  Thread Starter [habil66](https://wordpress.org/support/users/habil66/)
 * (@habil66)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105330)
 * I changed `<section id="main">` in functions.php to `<section id="primary" class
   ="content-area">` and the sidebar widgets seems to be in the right place now.
   However that dropdown list in the sidebar is not aligned. Is this is a css issue?
 *  Thread Starter [habil66](https://wordpress.org/support/users/habil66/)
 * (@habil66)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105333)
 * Ok, that was not the solution.
    I cant find the file in which `<div id="container"
   >` is located.
 *  [Maruti Mohanty](https://wordpress.org/support/users/marutim/)
 * (@marutim)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105335)
 * what do you mean by you cant find the file?
 * If you know how to do a search using the editor you are using, then do it.
 *  Thread Starter [habil66](https://wordpress.org/support/users/habil66/)
 * (@habil66)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105347)
 * I did search all the theme files but I cant find which file contains `<div id
   ="container">`.
    Maybe its Woocommerce that adds this?
 *  [Maruti Mohanty](https://wordpress.org/support/users/marutim/)
 * (@marutim)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105349)
 * Might be WooCommerce does it. Please have a look and make the necessary changes.
   You can find [this article](http://docs.woothemes.com/document/template-structure/)
   helpful.

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

The topic ‘Misplaced sidebar widgets’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/fashionistas/1.9/screenshot.png)
 * Fashionistas
 * [Support Threads](https://wordpress.org/support/theme/fashionistas/)
 * [Active Topics](https://wordpress.org/support/theme/fashionistas/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/fashionistas/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/fashionistas/reviews/)

## Tags

 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * 8 replies
 * 2 participants
 * Last reply from: [Maruti Mohanty](https://wordpress.org/support/users/marutim/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/misplaced-sidebar-widgets/#post-6105349)
 * Status: not resolved