[Support request] Adding a New Container

Home Forums Support [Support request] Adding a New Container

Home Forums Support Adding a New Container

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #617374
    Jordan

    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!

    GeneratePress 2.1.3
    #617393
    David
    Staff
    Customer Support

    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

    #617550
    Jordan

    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…

    #617831
    David
    Staff
    Customer Support

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.