[Resolved] Add button icon in shortcode with GP Elements

Home Forums Support Add button icon in shortcode with GP Elements

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1351456
    nik9

    Hello

    I’m trying to insert a button icon for my product filter button. I use the GP Element module and add via shortcode a filter to the page.

    <?php
    echo do_shortcode('[ocs_trigger id="productfilter01" element="button" text="FILTER OPTIONEN"]');
    
    ?>

    I want to have a icon inside the button but before the text.

    This would be a example for the filter icon. https://www.flaticon.com/free-icon/filter_3126539?term=filter&page=1&position=5

    Is there a way to do this directly in GP Element ?

    Cheers

    #1351947
    David
    Staff
    Customer Support

    Hi there,

    Hook elements will only work if there is a hook inside that buttons code, which is unlikely with an element that is displayed using a shortcode.

    You would need to check with the plugin author if a hook exists or whether any of the shortcode attributes such as the text="" accepts HTML

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