[Support request] Add custom body class IF an GP Element is rendered on page

Home Forums Support [Support request] Add custom body class IF an GP Element is rendered on page

Home Forums Support Add custom body class IF an GP Element is rendered on page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1167426
    Chris

    This might be more of a feature request – but if there is a way to do this it would be great. I’d like to be able to style a page a little differently depending on a GP Element appearing.

    I could start doing page templates, but thought if there were a field within the Element editor that allows custom classes to be targeted in the body tag it could open up the theme to some wild styling stuff!

    Example: I have an Element named ‘Testimonial’ that appears across most pages except a dedicated Testimonial page. If I could add a custom class to the body of ‘has-testimonial-element’ then I could style *other* sections on the page – whether higher or lower in the rendered HTML – for some creative results.

    I could do this via JS right now – but could be nice built in to the Settings panel where it has options to execute PHP and shortcodes

    #1167587
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This has come up a few times now, I think it would be a useful addition to all three Element types.

    I’ll see about getting this in GPP 1.10.0 or 1.11.0 🙂

    #1167940
    Chris

    oooohhh that’d be nice – thanks for the consideration!

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