Full width page template not working for Sparkling WordPress theme

Hi,

I have downloaded the page-fullwidth page (which contains full width layout)renamed it to ParentLoginTemplate also renamed the the code of the page

from

/**

  • Template Name: Full-width(no sidebar)
  • This is the template that displays full width page without sidebar
  • @package sparkling
    */

to

/**

  • Template Name: ParentLoginTemplate
  • This is the template that displays full width page without sidebar
  • @package sparkling
    */

Then selected this template for a page called parent login…
unfortunately same code is working for “Full-width(no sidebar)” but not for “ParentLoginTemplate”

I did not altered any code just renamed the file and the template name… but the layout is seen like attached file …

Hi @sittle,

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

To make the page work full width which is using the ParentLoginTemplate template, just try adding the following code in the functions.php file of your child theme.

/**
 * 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( 'ParentLoginTemplate.php' ) ) {
		return 'col-sm-12 col-md-12';
	}
	return 'col-sm-12 col-md-8';
}

I am assuming your copied template file name is ParentLoginTemplate.php if it’s not that then please try changing it in the above code.

I have attached he child theme that contains the above code so you can just download and use it.

Best Regards,
Movin