Archived topic
Line of Code and a Hook
3 replies · Started by Luke on December 15, 2022
I want to install social sharing buttons on my site using the code. From what I know I can do it using a Hook, but I don't know what it is.
Here's the code for the social sharing buttons to appear on my site:
<script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=639b16dd4c3197001565625f&product=inline-share-buttons' async='async'></script>
Can you tell me what to do to make these buttons appear on my site?
Hi there,
Tough for us to help by simply looking at the code.
Did it come with any instructions?
It's from this site: https://platform.sharethis.com
On the site it says: To activate, please add the code into the <head> section of your website.
But one person who uses these buttons on their site said that if someone is using GeneratePress then they can install this code using a Hook?
Yes. You can create a hook element and use the wp_head hook:
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/wp-head/