Site logo

Archived topic

Elementor library and sidebar

10 replies · Started by Robert on September 24, 2017

Viewing posts 1–11 of 11

Having an issue when creating an Elementor layout under 'my library' where the sidebar makes the layout narrower. https://cl.ly/0F1d0Z29323v. I thought that making the sidebar option under customizer set to "content (no sidebars)" would work and it did for pages but not for this page. Then I set single post sidebar options to the same and it fixed it, however this isn't ideal because i do want a sidebar on my single posts. So what i'm asking basically is if there is a way to not have the sidebar shown on the "my library" pages when editing in Elementor. Thanks!

The function looks interesting. How would I target it if the page is... /wp-admin/post.php?post=162&action=elementor?

Would I have to try to look for that in the URL?

I THOUGHT I figured it out by adding the following... BUT it's adding some weird gap on the front end even when the url does not contain 'elementor'.

add_filter( 'generate_sidebar_layout','elementorlib' ); 

function elementorlib() {
 
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
 
if (false !== strpos($url,'elementor')) {
	
	return 'no-sidebar';

	
} 
 
}

Another question - The layout isn't full width, like it would be if i was working on a page (this likely again has to do with the fact that it's using a post style layout. Is it possible, using a similar function, to force a full width layout via the page builder container options?

Well, it's not really a specific page. When you use the Elementor editor under "my library" you're essentially editing a post that has no specific name or differentiator so it makes it difficult to figure something like this out.

Sorry I'm confused. So what are you trying to achieve? Set all Elementor layout to no sidebars?

I'm trying to achieve a full width layout to operate within when editing a custom template. This isn't the same as firing up Elementor on a page or post, this is under "my library". When doing the former, you can easily specify 'full width' as the layout option, however when you're operating in 'my library' and editing a pre-defined template there is no such capability to edit the page you're currently editing as they aren't really pages. If you click into it, it doesn't show as a page, it just opens up Elementor immediately and uses the theme's default settings to control how the page you're on operates. As per one of my previous messages, I know I can set the default layout to full width in customizer but that would affect everything, so I'm looking for a programmatic way to simply adjust the 'my template'. I'd say the easiest way for you to understand is by loading up elementor and going under 'my templates' and seeing what i mean.

Wow I'm an idiot. This is what happens when you stare at the same thing for days lol. You CAN edit those options and there is a page that the meta boxes exist in. I was just hitting "edit with elementor" directly and not going into the page. I feel dumb. Thanks for your help. Maybe delete this thread lol. Thanks.

No problem! :)

This archived topic is closed to new replies.