Title: Unavailable sidebar due to missing source code
Last modified: March 22, 2025

---

# Unavailable sidebar due to missing source code

 *  [ronmeijers](https://wordpress.org/support/users/ronmeijers/)
 * (@ronmeijers)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/)
 * I used the plugin Widget Disable to disable the sidebar. Deactivation of the 
   plugin does not result in having a sidebar. So I fear that this plugin permanently
   altered the source code.
 * In my source code there is something missing (so I have been told): “<div id=”
   secondary” ”. Does anyone know how to fix this issue?
    -  This topic was modified 1 year, 2 months ago by [ronmeijers](https://wordpress.org/support/users/ronmeijers/).

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

 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18377794)
 * Hi [@ronmeijers](https://wordpress.org/support/users/ronmeijers/),
 * The visibility of your sidebar may depend on the active page template. To check
   which template is being used, edit your page, go to the editor sidebar, and click
   on the current template name in the **Template** section. [https://i.snipboard.io/Ls9Kib.jpg](https://i.snipboard.io/Ls9Kib.jpg)
 * That being said, you may try different page template.
 *  Thread Starter [ronmeijers](https://wordpress.org/support/users/ronmeijers/)
 * (@ronmeijers)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18381691)
 * Hi [@kharisblank](https://wordpress.org/support/users/kharisblank/),
 * Thanks for your reply! I checked it, and it’s set as default template. In the
   meantime I found the following snippet in function.php
 *     ```wp-block-code
       function sydney_set_modern_header_flag() {update_option( 'sydney-update-header', true );//Disable old content position codeupdate_option( 'sydney_woo_content_pos_disable', true );//Disable single product sidebarset_theme_mod( 'swc_sidebar_products', true );//Disable shop archive sidebarset_theme_mod( 'shop_archive_sidebar', 'no-sidebar' );}//add_action( 'after_switch_theme', 'sydney_set_modern_header_flag' );
       ```
   
 * Based on that I created a child theme and tried the following two settings separately:
 * set_theme_mod( ‘shop_archive_sidebar’, ‘sidebar’ );
   set_theme_mod( ‘shop_archive_sidebar’,‘
   left-sidebar’ );
 * Those however also did not result in any changes.
 * These were the snippets I added to the child theme’s function:
 *     ```wp-block-code
       // Enable single product sidebarfunction enable_single_product_sidebar() {    set_theme_mod('swc_sidebar_products', true);}add_action('after_switch_theme', 'enable_single_product_sidebar');// Enable shop archive sidebarfunction enable_shop_archive_sidebar() {    set_theme_mod('shop_archive_sidebar', 'left-sidebar');}add_action('after_switch_theme', 'enable_shop_archive_sidebar');
       ```
   
 * enable_single_product_sidebar works, enable_shop_archive_sidebar doesn’t.
 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18384208)
 * Hi [@ronmeijers](https://wordpress.org/support/users/ronmeijers/),
 * I’d like to investigate this further to help you better. For future reference,
   using this field when creating your topic would make it easier to track and resolve
   issues:
 * [https://i.snipboard.io/qhy3No.jpg.](https://i.snipboard.io/qhy3No.jpg.)
 * Let me know how I can assist you with this.
 *  Thread Starter [ronmeijers](https://wordpress.org/support/users/ronmeijers/)
 * (@ronmeijers)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18385052)
 * Hi [@kharisblank](https://wordpress.org/support/users/kharisblank/),
 * I am working on a subdomain (staging site). It’s a clone from [https://clnhouthandel.nl/](https://clnhouthandel.nl/).
   In a few days it will move to the main domain. Solving this before the planned
   move, would be awesome.
 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18388418)
 * Hi [@ronmeijers](https://wordpress.org/support/users/ronmeijers/),
 * I checked your homepage and it uses Canvas template. Try Default template instead.
   Ref: [https://i.snipboard.io/Ls9Kib.jpg](https://i.snipboard.io/Ls9Kib.jpg)
 *  Thread Starter [ronmeijers](https://wordpress.org/support/users/ronmeijers/)
 * (@ronmeijers)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18389799)
 * Hi [@kharisblank](https://wordpress.org/support/users/kharisblank/),
 * Upon changing the template I do have a sidebar in my homepage. But that is not
   what I am looking for. I’d like to have a sidebar in my product overviews, so
   people can select a material-type for example.
 * So I took a deep dive and this is what I found in the [page source](http://view-source:https://clnhouthandel.nl/product-categorie/tuinhout-balken/)
   of such an overview page:
 *     ```wp-block-code
       <body data-rsssl=1 class="archive tax-product_cat term-liggers term-4298 logged-in admin-bar no-customize-support custom-background theme-sydney woocommerce woocommerce-page woocommerce-no-js mega-menu-primary menu-inline no-sidebar elementor-default elementor-kit-632" >
       ```
   
 * In the child theme of my subdomain, I get the same result after changes made 
   to functions.php. So the question appears to be: how do I change ‘no-sidebar’
   to ‘sidebar’ in that line of code
 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18390451)
 * > _But that is not what I am looking for. I’d like to have a sidebar in my product
   > overviews, so people can select a material-type for example._
 * [@ronmeijers](https://wordpress.org/support/users/ronmeijers/), to enable the
   shop sidebar in Sydney, follow these steps:
    1. Navigate to **Appearance > Customize > WooCommerce > Product Catalog > General
       > Layout**
    2. Under the **Sidebar** section, select your preferred sidebar location
    3. Save your changes
 * Remember to clear your cache after making these updates to ensure the changes
   take effect immediately.
 *  Thread Starter [ronmeijers](https://wordpress.org/support/users/ronmeijers/)
 * (@ronmeijers)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18392020)
 * Hi [@kharisblank](https://wordpress.org/support/users/kharisblank/),
 * I had already tried that. It makes room for a sidebar, but the sidebar does not
   appear when I do that.
 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18400456)
 * > _It makes room for a sidebar, but the sidebar does not appear when I do that._
 * [@ronmeijers](https://wordpress.org/support/users/ronmeijers/),
 * The sidebar will remain empty until you add an active widget to it.
 * If your widget isn’t appearing as expected, it may have specific visibility settings.
   In that case, please check the widget’s configuration to ensure it’s set to display
   on your shop page.
 * Let me know if you need any help with this!

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

The topic ‘Unavailable sidebar due to missing source code’ is closed to new replies.

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

## Tags

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

 * 9 replies
 * 2 participants
 * Last reply from: [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/unavailable-sidebar-due-to-missing-source-code/#post-18400456)
 * Status: not resolved