Blog, Website & Page Publishing

NLakmali
Miembro

Add a "Like" button to a blog post

resolver

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 Me gusta
1 Soluciones aceptada
Syeda_Fatima
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Add a "Like" button to a blog post

resolver

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!

Ver la solución en mensaje original publicado

2 Respuestas 2
Syeda_Fatima
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Add a "Like" button to a blog post

resolver

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
Miembro

Add a "Like" button to a blog post

resolver

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