How to make pages full-width to support shortcode elements

Asked on October 5, 2015 in Customization.

Hi Guys

Been trying out Layers for the last couple of days and I really like it. I use WP Canvas Shortcode for my website, especially the “full width” shortcode for images within posts.

Not sure why but it doesn’t seem to work with the layers theme, is this something you have come across before and know of a fix?



drewstain Layers User
1 Answer(s)
Answered on October 5, 2015.

Hi there,

The Layers page content area is boxed, which means it has styling that limits its width to a specific width. Your shortcode can only full width something within this area to that limit.

To use a plugin like this one or other post content shortcodes like Aesop Story Engine, you need to use custom CSS to change the page layout to 100% wide. The width of elements in your post in this case, including the text, depends on how you format it with your shortcodes or layout plugin.

If you want to allow this on all pages that use the Default page template, you can add this to the CSS panel in the Customizer:

.page-template-default .container.content-main{max-width: 100%;}

To remove the padding:

.page-template-default .container.content-main{padding: 4% 0;}