Archived topic
how to convert header logo from link to a button, triggering a small script?
1 reply · Started by Jakob on March 17, 2022
Hey!
I wish to change the function of my header logo, from the default homepage link to a button, triggering a script with a short audio file. What would be the best practice to do this?
Should I use hooks or go editing the existing PHP with filters?
I'm not too mindblowingly advanced on the web dev front yet, and I started with GP just recently, but if you could just point me in the generally right direction, I'll make my best to figure it out.
Cheers,
J
Hi Jakob,
I believe you are looking to change the HTML output of the logo with this filter:
https://docs.generatepress.com/article/generate_logo_output/
See the original section here:
https://github.com/tomusborne/generatepress/blob/adfe090929b0515cdf894f4c6b722cfe8c0790dc/inc/structure/header.php#L151-L165
And examples of using the filter: https://generatepress.com/forums/search/generate_logo_output/
Hope this helps :)