Title: content and sidebar width
Last modified: September 25, 2017

---

# content and sidebar width

 *  Resolved [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/)
 * Hello
    My site’s layout for pages with a sidebar are 50/50 So, I added this filter:
 *     ```
       add_filter( 'generate_content_class','ds_equal_columns' );
   
       	function ds_equal_columns() {
       		if (!is_front_page() && !is_page(20) ){
         ?>
         class="content-area grid-parent mobile-grid-100 push-50 grid-50 tablet-push-50 tablet-grid-50"
        <?php }}
       ```
   
 * As you can see I added a condition because on the homepage and another page i
   didn’t want the 50/50 layout but a full page layout.
    SInce checking in the admin“
   full content” didn’t help (because the grid-50 classes were implemented on the
   div) Is there a better way to go forward? So I can have pages that I do want 
   with a 50/50 layout to be selected via the meta box, and other pages to be full
   width? Thanks, Dan
    -  This topic was modified 8 years, 7 months ago by [Dan Stramer](https://wordpress.org/support/users/danstramer/).

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

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/#post-9529020)
 * You could use this filter to tell your sidebar to be 50% wide: [https://docs.generatepress.com/article/sidebar-widths/](https://docs.generatepress.com/article/sidebar-widths/)
 * Then the other classes will adjust automatically.
 * Let me know if you need more info 🙂
 *  Thread Starter [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/#post-9529078)
 * Thanks Tom,
    So the “return” on the filter is the value of the grid added to 
   the css? and all the other corresponding values? _grid-50 tablet-grid-50 mobile-
   grid-100 grid-parent sidebar pull-50 tablet-pull-50_
 * And the content would adjust accordingly?
 * So in my case adding this filter:
 *     ```
       add_filter( 'generate_left_sidebar_width','tu_custom_left_sidebar_width' );
       function tu_custom_left_sidebar_width( $width ) {
               // If we're on a category
   
       		return 50;
   
       	 // Return the default
       	return $width;
       }
       ```
   
 * And if I select a ‘full-width’ page from the metabox in the page editing pane–
   will it override this setting? Since I would like to have some ‘full-width’ pages.
 * Thanks again for your help,
    Dan
 *  Thread Starter [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/#post-9529108)
 * Hi Tom,
    I just checked it out now and it’s working as expected. It’s my first
   time using generatepress and the unsemantic framework – it’s working great!
 * Thanks
    Dan
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/#post-9536492)
 * Great to hear! Glad I could help 🙂

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

The topic ‘content and sidebar width’ is closed to new replies.

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

 * 4 replies
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/edge22/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/content-and-sidebar-width/#post-9536492)
 * Status: resolved