Blog, Website & Page Publishing

NLakmali
Membre

Add a "Like" button to a blog post

Résolue

Hello, I m trying to figure out how to add a button at the footer of every blog post, that will help me capture or allow visitors to like the article.

 

Thank you.

0 Votes
1 Solution acceptée
Syeda_Fatima
Solution
Contributeur de premier rang | Partenaire solutions Diamond
Contributeur de premier rang | Partenaire solutions Diamond

Add a "Like" button to a blog post

Résolue

Hi @NLakmali, This is quite easy. I am sharing you the steps please do try by following from below.

You can add a like button to the footer of each blog post by using a plugin or code snippet. For example, if you are using WordPress, you can use the ProfileGrid or Jetpack plugin to add a like button to the footer of each blog post.

Alternatively
, if you are comfortable with coding, you can add the like button using a code snippet or by using third-party services such as AddThis or ShareThis.

And if you are trying from HubSpot, then:

1. Log in to your HubSpot account and navigate to your blog settings.
2. Select the "Design" tab and scroll down to the "Footer" section.
3. Add an HTML module to the footer and paste the following code into it:

<a href="javascript&colon;void(0);" onclick="document.getElementById('like-btn-<post-id>').innerHTML = 'Thanks for liking this article!';"> <button>Like this article</button> </a>
<span id="like-btn-<post-id>"></span>

4. Replace the <post-id> placeholder in the code with the ID of the post.
5. Click "Save Changes" to save the footer code.
6. Publish your post to make it live on your website.


Let me know if face any difficulty, and I'll navigate with a more easy process. Cheers!

Voir la solution dans l'envoi d'origine

2 Réponses
Syeda_Fatima
Solution
Contributeur de premier rang | Partenaire solutions Diamond
Contributeur de premier rang | Partenaire solutions Diamond

Add a "Like" button to a blog post

Résolue

Hi @NLakmali, This is quite easy. I am sharing you the steps please do try by following from below.

You can add a like button to the footer of each blog post by using a plugin or code snippet. For example, if you are using WordPress, you can use the ProfileGrid or Jetpack plugin to add a like button to the footer of each blog post.

Alternatively
, if you are comfortable with coding, you can add the like button using a code snippet or by using third-party services such as AddThis or ShareThis.

And if you are trying from HubSpot, then:

1. Log in to your HubSpot account and navigate to your blog settings.
2. Select the "Design" tab and scroll down to the "Footer" section.
3. Add an HTML module to the footer and paste the following code into it:

<a href="javascript&colon;void(0);" onclick="document.getElementById('like-btn-<post-id>').innerHTML = 'Thanks for liking this article!';"> <button>Like this article</button> </a>
<span id="like-btn-<post-id>"></span>

4. Replace the <post-id> placeholder in the code with the ID of the post.
5. Click "Save Changes" to save the footer code.
6. Publish your post to make it live on your website.


Let me know if face any difficulty, and I'll navigate with a more easy process. Cheers!

NLakmali
Membre

Add a "Like" button to a blog post

Résolue

Amazing. I will have this tried and keep this space posted. @Syeda_Fatima