Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Element Width Works on CPT But Not Page

  • Hello,

    I have created an element that I would like to get pulled in across the site on various pages.

    I originally created this to only show on a custom post type I have. The element was spanning the whole width of the page, which I didn’t like, so I added padding and that did the trick.

    Now, as I try to add the same containers/blocks in a seperate element to the pages on my site, it continues to span the full width of the page, even when I update the margins and/or padding to the containers within the element.

    Any ideas why this is happening and what I can do to fix it?

  • Hi there,

    can you share a link to where i can see the issue ?

  • CPT where the padding is working (see bottom): https://www.lanclocal.com/directory/village-farm-market/
    Page where the same element & padding is not working (see bottom): https://www.lanclocal.com/ephrata-pa/pizza/

  • Did you copy the element content to a new element?

    If so, can you try duplicating the root container so it can generate a new ID and generate new CSS?

    Let me know πŸ™‚

  • Originally I did copy and paste the element content to a new element but now I resorted to just having the one element show up in both places (CPT and main pages). It’s very odd, because it’s the same element with the same settings but it looks OK in the CPT but not pages.

  • So it’s working fine now?

    Let me know if you still need help πŸ™‚

  • Sorry, no I wasn’t very clear.

    What I was trying to say is I don’t think what you described is the issue, because everything is in one element now. So the ID and CSS should be fine, right?

  • I see, the CSS isn’t loading on the page, can you disable your cache plugin to test?

    Does it work if you check the page in customizer?

    Let me know πŸ™‚

  • Ahh that’s strange.

    I disabled the cache plugin and it’s giving me the same result in customizer.

    Any other suggestions?

  • What Ying was saying is the issue, see here:

    https://app.screencast.com/6dzAW1UqnGrFk

    In that post content the top level container block has the same unique class ID that the hooked in content has.

    IF you edit the Element, and duplicate the parent container and then delete the original it will reset that class.

  • Thank you both so much! That worked great.

  • Glad to hear that!

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