Full Width Template not working?

Hi,
I am having trouble with the “Full Width Template” of this theme, when I try to make a new template based off of it, it doesn’t go to full width though I have copied it exactly and it doesn’t have a sidebar. When I checked it on inspect element Instead what it is doing is that its going col-sm-12 col-md-8 instead of col-sm-12 col-md-12…

I wanted to make my own grids using the bootstrap columns but this <div class=“main-content-inner col-sm-12 col-md-8 pull-left”> makes it all squished as seen here http://shootingrange.jemimasantos.com/contact/
and when I get rid of that code <div class=“main-content-inner col-sm-12 col-md-8 pull-left”> it fixes the problem and the column is not squished anymore.

Please help! thanks in advance

Hi @xijeme,

I hope you are well today and thank you for your question.

We are adding these classes by checking whether the template displayed is full width template so you can add your template in this condition so that appropriate classes will get added on the pages using your custom full width template.

To achieve this you can add the following code in the functions.php file of your child theme and replace the file name ‘custom-page-fullwidth.php’ in the following code with your custom full width template file name.

/**
 * Add Bootstrap classes to the main-content-area wrapper.
 */
function sparkling_main_content_bootstrap_classes() {
	if ( is_page_template( 'page-fullwidth.php' ) || is_page_template( 'custom-page-fullwidth.php' ) ) {
		return 'col-sm-12 col-md-12';
	}
	return 'col-sm-12 col-md-8';
}

/**
 * Set the content width for full width pages with no sidebar.
 */
function custom_sparkling_content_width() {
  if ( is_page_template( 'page-fullwidth.php' ) || is_page_template( 'custom-page-fullwidth.php' ) ) {
    global $content_width;
    $content_width = 1008; /* pixels */
  }
}
add_action( 'template_redirect', 'custom_sparkling_content_width' );

Best Regards,
Movin