Archived topic
Is there any Hook for button?
3 replies · Started by Sebastien on June 25, 2019
Hi,
I've made a custom SVG icon library, with CPT. I'm able to call my SVG icon using PHP into function.php (only: I can't add php directly into wordpress editor).
I would like to know if there any way to Hook all <button> </button>. My plan is to add SVG icons into the tag <button> </button>.
I could use shortcode... but I tend to avoid it since I discover it descrease speed load.
thanks
Hi there,
no - hooks have to be written into a template.
Choices are to inline the SVG within the button HTML or to use a shortcode.
Thanks !
I'm going to try to create a new block 'Custom button' with a dedicated template.
Cool :)