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.

class

  • Hello, is it possible to change the class of individual elements using GenerateBlocks PRO?

    For example

    <p class=”gb-text gb-text-ccd9c8ea“>TEXT.</p>

    And I want, for example:

    <p class=”text-hero“>TEXT.</p>

  • Yes, it’s possible using a global style. The only class that will always be there is the gb-text. This is a base class that GenerateBlocks always adds to identify the block type, and it will always remain even when you use global styles.

    Currently your example text has this class also appended gb-text-ccd9c8ea because you have some local styles applied to it. While you have the text selected, you can enter your new text-hero class that you want to start using from the right panel and click Create.

    Create a new global style

    On the next screen, select the Move the local block style. This will move any local styles to the newly created. Then, click the Start Editing button.

    Move the local block styles

    Your local styles are now moved to this new global style you are editing. Once you are done, saving the page will also save your global style. The text-hero global style can, of course, be reused for other blocks if needed.

    If you didn’t have any local styles in the block to begin with, you would start with a blank global style and modify accordingly.

    Once you do all that, your text block will only have the gb-text and text-hero classes appended to it.

    Hope that’s clear!

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