Resolved

Default Page Template

Ultra Theme started by Said Jan 18, 2018 13 replies
Said Jan 18, 2018 · 3:10 pm #8607

Hello,

Thank you for this awesome theme.

Is there a way to have Full Width – No Title selected instead of Default Template for Template under Page Attributes when creating a new page?

Thank you,
Said

Puro Support Puro Jan 18, 2018 · 4:38 pm #8609

Hi Said

Thanks for reaching out.

One method would be to use a child theme and copy page.php into the child theme and then replace the contents of page.php with the contents of full-width-no-title.php.

If you aren’t yet using a child theme you’d need to migrate your Customizer options once the child theme has been activated. Please, see: https://purothemes.com/customizer-settings-export-import/.

We can assist with this child theme. Let us know if you’d like to go down this route 🙂

Said Jan 18, 2018 · 7:20 pm #8610

I am using a child theme. I thought of copying page.php into the child theme folder but I wasn’t sure how to modify it. Thank you for help.

I still have one issue, though. I’ve copied full-width-no-title.php content into child theme’s page.php. However, the sidebar area (only an empty area, not sidebar widgets) is still visible. How do I remove it completely? Does it have to do with sidebar.php or maybe functions.php?

Your support is highly appreciated.

Said

Puro Support Puro Jan 18, 2018 · 7:40 pm #8612

Nicely done 🙂 Please, try adding to Custom CSS or child theme stylesheet:

.page-template-default #primary {
	border: none;
	float: none;
	padding: 0;
	width: 100%; 
}
Said Jan 18, 2018 · 7:55 pm #8614

It didn’t work 🙁

I think the sidebar is activated but I’m not sure how to deactivate it by default. The line between sidebar and page content is visible.

Puro Support Puro Jan 18, 2018 · 8:00 pm #8615

Try replacing Custom CSS with:

.page-template-default #primary {
	border: none;
	float: none;
	padding: 0;
	width: 100%; 
}

.page-template-default.sidebar #primary {
	border-width: 0;
	float: none;
	padding-right: 0;
	width: 100%;   
}

.page-template-default .site-content > .container {
	padding-top: 3.57143em; 
}
Said Jan 18, 2018 · 8:06 pm #8616

No change.

I still don’t think the issue is with the style. I tried sharing a screenshot of the issue but it didn’t appear (maybe for security reasons). I’ll keep working on it and let you know if resolve the issue.

Thanks once again for your help. Much appreciated.

Puro Support Puro Jan 18, 2018 · 8:08 pm #8617

Thanks, we’d need to inspect the page live. You can use the Private Reply checkbox for that.

Said Jan 19, 2018 · 6:26 pm #8628

The website isn’t live yet.

I think I have an idea on what causes the problem but I don’t know how to solve it. The class sidebar is added into the body tag. Based on extras.php, it should only be added when sidebar is active. Therefore, there must be some setting that keeps sidebar active by default. Is there a way to change this?

Said Jan 19, 2018 · 6:42 pm #8629

Solved!

I copied header.php to my child theme’s folder and removed the line that adds classes to the body: <?php body_class(); ?>. I’m worried this might affect the layout of other pages (e.g. pages that have sidebars).

Any better solutions are welcome. Thank you!

Puro Support Puro Jan 19, 2018 · 8:28 pm #8634

Unfortunately, that’ll cause other issues. Please, try changing Custom CSS to:

.page-template-default #primary {
	border: none !important;
	float: none !important;
	padding: 0 !important;
	width: 100% !important; 
}

.page-template-default.sidebar #primary {
	border-width: 0 !important;
	float: none !important;
	padding-right: 0 !important;
	width: 100% !important;   
}

.page-template-default .site-content > .container {
	padding-top: 3.57143em; 
}
Said Jan 20, 2018 · 2:46 am #8635

It still doesn’t work 🙁

Is it possible to modify the default values of Page settings added by the theme?

Said Jan 20, 2018 · 7:52 am #8636

I did it!

I did not override page.php. Instead, I chose to override the function that sets *Page settings* (available in settings.php which is ultra_setup_page_setting_defaults( $defaults, $type, $id ). I did this by copying the function (renamed) into the child’s functions.php and giving it a higher priority, selecting the defaults I want. Like so:


function child_ultra_setup_page_setting_defaults( $defaults, $type, $id ) {
	$defaults['layout']              	            = 'full-width';
	$defaults['display_top_bar']             = true;
	$defaults['display_header']      	    = true;
	$defaults['header_margin']     	    = true;
	$defaults['page_title']          	            = false;
	$defaults['display_footer_widgets'] = true;
	$defaults['footer_margin']       	    = true;

	return $defaults;
}
add_filter( 'siteorigin_page_settings_defaults', 'child_ultra_setup_page_setting_defaults', 100, 3 );

This works out much better than my first solution!

I highly appreciate every minute you put into trying to resolve my issue. And once again, thank you for this amazing theme!

Cheers,
Said

Puro Support Puro Jan 20, 2018 · 4:20 pm #8637

Really glad to hear you’ve been making progress, thanks for the update 🙂

14 posts