Site logo

Archived topic

Adding a New Container

3 replies · Started by Jordan on July 6, 2018

Viewing posts 1–4 of 4

Hi Tom,

I just love your theme!!

One thing I've not been able to figure out yet though is how to create and add additional container options so that a different container layout may be selected for certain pages/posts in the admin. For example, on some pages I may want a container with a 30px padding but on others I may want 40%.

I see your instructions at this link for setting the container https://docs.generatepress.com/article/page-builder-container/ but I'd like to know how to create additional containers.

Thanks!

Hi there,

that would take some custom coding and i am not sure what Tom has planned in this area just yet.

currently this would require some CSS to be added to the page, which can be done with Tom's Simple CSS plugin as it adds a page specific Simple CSS meta box to the page editor.

The other method if you can identify the pages by Page ID or template type we can target a body class.

Or with the new GP 1.7 (beta) Elements module we could use a hook to enqueue the different CSS and then apply it using the Display Rules.

Let me know

Ok, I was hoping this may be as simple as adding a snippet or two to functions.php using a Code Snippets type plugin but these are nice options.

Can you elaborate on option 3? I'm not familiar with the Elements module but this sounds intriging...

Here is the changelog with gives a good overview.

https://generatepress.com/gp-premium-1-7/

Display Rules for hooks, pageheaders and layouts will make this easier. Effectively you could hook the style changes in the WP head or enqueue them and then assign that to the various posts / pages.

This archived topic is closed to new replies.