Archived topic
Add button icon in shortcode with GP Elements
1 reply · Started by nik9 on July 4, 2020
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
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