Archived topic
Local page layout setting has no effect over the general layout settings?
16 replies · Started by Carsten on August 11, 2020
Hi there, in Customize, my Sidebar Layout is set to Content/Sidebar, but I want to exclude my register page, to be Content (no sidebars).
In my Register page, the Page Layout Settings is set to Content (no sidebars).
I might be able with some css to exclude a page from having sidebars, but what's the idea of having the local page setting, if it has no effect over the general layout settings in the customize section?
Thanks!
Hi there,
Is the registration page a normal static page or an automatically generated page?
Can you disable the caching plugin for now?
I don't know the difference between a static page, and other pages, but there are no contents on the register page, its a custom link, so it has probably been auto generated by BuddyPress. But the page layout follow the setting in Customize>Layout, so I can't see why it should not behave like a normal page.
Hi there,
what happens to the sidebar on that page when you disable them in the Customizer ?
Hi there, then the page turn to content no sidebar, as the rest of the site, I just disabled sidebars now.
So that proves the template is behaving correctly.
Is there a specific Display Rule for Registration or Register NOT Page > Registration.
Not what I can see, I deactivated all my custom css, but same result.
I also created a layout element, choosing
Sidebar: Content (No Sidebars) and
Display Rules: Page: Register, but it did not do the trick either.
It's like the Register page does not respond to elements, I earlier tried to add a block element to the register page, but it does not display.
Do you have any other layout elements created?
Yes I have, among these, a footer layout element, which are working well
What if you disable all other layout element and only keeping the sidebar one activated?
I makes no difference.
I think it would be much easier, if you logged in and saw this issue by yourself, it would save much of our time, I think.
Thanks!
Feel free to send us login info: https://generatepress.com/contact
Just be sure to link to this topic.
Thanks!
Can't see anything obvious.
It is an automatically generated page though as there is no content in when I check in Edit page.
Can you try this PHP snippet and see if this works?
add_filter( 'generate_sidebar_layout', function( $layout ) {
if ( is_buddypress() && bp_is_register_page() ) {
return 'no-sidebar';
}
return $layout;
} );
Hi there, I'm glad that you can't find any obvious reason why it should not work. I think the page is automatically generated by BP, but never the less, it is listed as a page under Display rules location.
I think there is a general issue using elements with BP. It would be really nice if you could locate why elements does not output on BP pages!
Thanks for the code, I'm not able to test it before later this weekend, but I'm sure it fixes the sidebar issue.
Thanks!
The display rule sometimes can't take care of all the conditions that are not commonly used, which is why we have the filter solution available.
Definitely let me know if the snippet solution works for you :)