[Support request] Assign an ID to a button in Generateblocks

Home Forums Support [Support request] Assign an ID to a button in Generateblocks

Home Forums Support Assign an ID to a button in Generateblocks

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1687286
    Emil

    Hi!

    I’m trying to implement this solution to my site: https://codepen.io/ojbravo/pen/YPJpXe

    The only thing I don’t seem to get working is the buttons. If I take HTML section with the buttons (links) and paste it in an HTML-block in WordPress, it works just fine. But I want to use Buttons in Generateblocks.

    This is the HTML-code:

    Show Full Article
    Hide Full Article

    The problem with Buttons in Generateblocks is that I don’t know how to make it id=”show” and id=”hide”. If I do it in the HTML Anchor box it won’t work.

    Can you help me with this or is there another solution that works better?

    I can’t show you the specific site as it’s not live yet…

    Thank you,
    Emil

    #1687287
    Emil
      <a href="#show" class="show btn" id="show">Show Full Article</a> 
      <a href="#hide" class="hide btn" id="hide">Hide Full Article</a> 
    #1687321
    David
    Staff
    Customer Support

    Hi there,

    select the Button – go to the Advanced settings and add your ID to the HTML Anchor field.

    #1687325
    Emil

    If I do that, it scrolls down so that the button is at the top of the screen when I click it. I don’t want to create an HTML anchor.

    I want the functionality that the codepen example shows. And it works fine with the HTML-code I wrote here but I don’t want to use HTML-blocks.

    According to the code, the link goes to “#show” and the link itself is id=”show”. I don’t understand that part.

    #1687427
    Leo
    Staff
    Customer Support

    David’s instruction simply shows you that it’s possible to assign an ID to the buttons block of GB and how to do it.

    We cannot help with implementing a solution from Codepen in the support forum here unfortunately – please refer to our forum scope:
    https://generatepress.com/what-support-includes/

    If you want to implement that solution, it might be easier to do it without GB.

    GB also has its own support system:
    Free: https://wordpress.org/support/plugin/generateblocks/
    Pro: https://generateblocks.com/support/

    Thanks for your understanding 🙂

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