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.

icon to a button using the Styles creator

  • Hi, I wanted to know if it’s possible to add, for example, an icon to a button using the Styles creator. I’m not sure if it’s possible. I want to be able to create a button with its SVG and text, simply using styles. https://ibb.co/fdgYmJ7h

  • Hi there,

    Not sure what you mean, isn’t it just a button with text and icon?

    If so, you can use GB’s button block, and add an icon to the button in the settings panel.

    Let me know if I misunderstood your question.

  • Hi Ying, yes, that’s exactly it. What I mean is, can the icon be created directly from the style already integrated into the class? Like we would do with before or after in pure CSS? Thanks.

  • Hi David,

    The Styles visual editor can’t quite get you all the way there. With GB Pro Styles you can add custom selectors like ::before and ::after, and you can set properties like content and background images on them — but there’s no way to assign an SVG or use CSS masks through the visual interface.

    So for now, your best options are:

    1. Use the built-in icon setting in the GB Button block — this is the intended workflow and handles sizing, color, and alignment for you. You can still use a Style for the button’s other visual properties (colors, padding, borders, etc.) and just add the icon per-block.
    2. Add the icon via custom CSS outside of the Styles editor (e.g., in a GP Element or Customizer CSS) using a ::before/::after pseudo-element with a CSS mask technique, then apply that class to your buttons. This gives you the reusable class approach you’re after, but it’s code-based rather than visual.

    It is a good idea for a feature request, though, so I will let the team know!

  • OK George, I’ll do that, thanks for handling the request.

  • Ok, no problem!

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