Blog, Website & Page Publishing

NLakmali
メンバー

Add a "Like" button to a blog post

解決

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 いいね!
1件の承認済みベストアンサー
Syeda_Fatima
解決策
トップ投稿者 | Diamond Partner
トップ投稿者 | Diamond Partner

Add a "Like" button to a blog post

解決

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!

元の投稿で解決策を見る

2件の返信
Syeda_Fatima
解決策
トップ投稿者 | Diamond Partner
トップ投稿者 | Diamond Partner

Add a "Like" button to a blog post

解決

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
メンバー

Add a "Like" button to a blog post

解決

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