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.

button with 2 icons

  • hi 🙂

    i want a button with 2 icons, one on the left side, one on the right side.
    in generate blocks, i can add the left one. but how can 2 be added?

    thx

  • I am using a grid and it works just fine

  • Hi there,

    the Button block will only support one SVG Icon inside it.
    Are the icons SVGs ?

  • yes, they are svg´s.
    hm.., so i thing maybe i have to add them with css or js

  • How many buttons will have two icons ?
    As you could build a “button” using a Container Block to which you can add the link ( in GB Pro ).
    Then inside it add 2 x Headline blocks one for the first icon, and one for the text and second icon.

    Let me know

  • ok, this would be a solution.

    but i want the button element to have the look as a button in the backend, so i thing i will you a class, and then add markup with js, or with css pseudo elements.

    thx a lot (y) 🙂

  • One thing you could try.
    In the button icon SVG HTML field, you cab can add multiple <svg> tags, to show 2 icons.
    You would need to copy paste the HTML inside there.

    Then give the button a class of two-icons and add this CSS:

    
    .gb-button.two-icons {
        position: relative;
    }
    .gb-button.two-icons .gb-icon svg:last-of-type {
        position: absolute;
        right: 20px;
    }
    

    It will position the 2nd ( last ) SVG icon to the right of the button.
    Just make sure the button has some right padding to accommodate it, and adjust the above right: 20px value to suit.

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