[Resolved] Default Page Template

Tagged: 

  • Author
    Posts
  • #8607

    Said
    Participant

    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

    #8609

    Puro Support
    Keymaster

    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 🙂

    #8610

    Said
    Participant

    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

    #8612

    Puro Support
    Keymaster

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

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

    Said
    Participant

    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.

    #8615

    Puro Support
    Keymaster

    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; 
    }
    #8616

    Said
    Participant

    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.

    #8617

    Puro Support
    Keymaster

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

    #8628

    Said
    Participant

    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?

    #8629

    Said
    Participant

    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!

    #8634

    Puro Support
    Keymaster

    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; 
    }
    #8635

    Said
    Participant

    It still doesn’t work 🙁

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

    #8636

    Said
    Participant

    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

    #8637

    Puro Support
    Keymaster

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

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

Scroll to top