Title: Theme layout issue on plugin
Last modified: August 30, 2016

---

# Theme layout issue on plugin

 *  [jh5512](https://wordpress.org/support/users/jh5512/)
 * (@jh5512)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/)
 * Im using a child theme of the theme ‘DevDmBootstrap3’ thats using bootstrap to
   control the main area as well as sidebars.
 * Furthermore I have made a filter function to use the parents theme hook that 
   controls the 12 colums available based on the sidebar settings.
 * My function looks like this:
 *     ```
       function jh_deregister_sidebar_per_page() {
           //gets the parent theme variable array that stores view areas
           //such as main, right_sidebar, left_sidebar
           global $dm_settings;
   
           $columns = '12';
   
           //checks if current page is Kalender, if so set right sidebar to 0
           if (is_page('Kalender') ) {
               $dm_settings['right_sidebar'] = 0;
           }
   
           if ($dm_settings['right_sidebar'] != 0) {
               $columns = $columns - $dm_settings['right_sidebar_width'];
           }
   
           if ($dm_settings['left_sidebar'] != 0) {
               $columns = $columns - $dm_settings['left_sidebar_width'];
           }
   
           return $columns;
       }
   
       add_filter( 'devdmbootstrap3_main_content_width_hook', 'jh_deregister_sidebar_per_page' );
       ```
   
 * Notice the if(is_page(‘Kalender’), which does the magic I need, I want to display
   the output of your plugin on my Kalender page. I am able to disable my sidebar
   on my ‘Kalender’ page with my code just fine, except when I activate the calendar
   plugin and set it up to output its view on that page. Then my main area is changed
   from col-md-12 to col-md-9 and a useless sidebar that I don’t want on this page
   re-appears with a col-md-3.
 * So how can I view the calendar output of your plugin in a main col-md-12 div 
   wrapper without having that annoying sidebar (I can’t globally disable it because
   I need it on other pages).
 * The problem can be seen on [http://www.jh-dev.dk/MIL/kalender](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/www.jh-dev.dk/MIL/kalender?output_format=md),
   the sidebar I don’t want has the H3 ‘Relaterede sider’ in a div class=”col-md-
   3″ wrapper.
 * [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)

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

 *  Thread Starter [jh5512](https://wordpress.org/support/users/jh5512/)
 * (@jh5512)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/#post-6400764)
 * I should add that I made a page template for my calendar page titled ‘Kalendar’.
   It goes like this:
 *     ```
       <?php
       /*
       Template Name: Kalender
       */
       ?>
   
       <?php get_header(); ?>
       <?php get_template_part('template-part', 'head'); ?>
       <?php get_template_part('template-part', 'topnav'); ?>
   
       <!-- start content container -->
       <div class="row dmbs-content">
   
           <div class="col-md-<?php devdmbootstrap3_main_content_width(); ?> dmbs-main">
   
           </div>
   
           <?php //get the right sidebar ?>
   
       </div>
       <!-- end content container -->
   
       <?php get_footer(); ?>
       ```
   
 * And I have tried to change the “col-md-<?php devdmbootstrap3_main_content_width();?
   > to col-md-12 and its not helping. The result is the same. I get both a main
   col-md-9 wrapper as well as a col-md-3 sidebar wrapper (when I set my calendar
   to output its view on this page that is).
 *  [AudreyHepburn](https://wordpress.org/support/users/audreyhepburn-1/)
 * (@audreyhepburn-1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/#post-6400842)
 * Thanks for informing me about your post. Very thoughtful 🙂 Let’s see if someone
   can help us, with our layout problems. Here is mine again: [https://wordpress.org/support/topic/month-view-shows-disturbing-design-elements-of-theme?replies=1](https://wordpress.org/support/topic/month-view-shows-disturbing-design-elements-of-theme?replies=1)
 *  Thread Starter [jh5512](https://wordpress.org/support/users/jh5512/)
 * (@jh5512)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/#post-6400864)
 * I found a hacky temporary fix that isn’t disabling the sidebar as I wanted but
   rather hiding it and upscaling the main wrapper to use 100% width.
 * With this LESS code:
 *     ```
       body {
         	&.tribe-theme-child-devdmbootstrap3-child-mil{
         		.dmbs-main{
         			width: 100%;
         		}
         		.dmbs-right{
         			display: none;
         		}
         	}
       }
       ```
   
 * So if anyone finds a solution to have my sidebar remain disabled on this calendar
   page, even after the calendar plugin is activated, I would still be interested
   in hearing how this would be done.
 *  [Brook](https://wordpress.org/support/users/brook-tribe/)
 * (@brook-tribe)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/#post-6401023)
 * Howdy jh5512,
 * You could create a standard WP “Page Template” and then not show the sidebar 
   in that template. You might already even have on created. Have you viewed the
   various template in WP-Admin > Events > Settings > Display? Does oine of those
   looks as you want, without a sidebar?
 * Cheers!
    – Brook

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

The topic ‘Theme layout issue on plugin’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

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

 * 4 replies
 * 3 participants
 * Last reply from: [Brook](https://wordpress.org/support/users/brook-tribe/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/theme-layout-issue-on-plugin/#post-6401023)
 * Status: not resolved