• Home
  • Showcase
    • Newspaper Showcase
    • Newsmag Showcase
  • Support
    • Newspaper Forum
    • Newsmag Forum
    • Blog
    • Documentation
      • Newspaper Documentation
      • Newsmag Documentation
      • The Theme API
    • What’s New
      • Newspaper
        • What’s New in v 11.5
        • What’s New in v 11.4.3
        • What’s New in v 11.4
        • What’s New in v 11.2
        • What’s New in v 11
        • What’s New in v 10.4
        • What’s New in v 10.3.7
        • What’s New in v 10.3.2
        • What’s New in v 10.3
        • What’s New in v 10
      • Changelog
        • Newspaper
        • Newsmag
        • tagDiv Opt-In Builder
  • Services
    • Web Development Services
    • Web Solutions & CMS Development
    • Web design & Front-end Development
    • E-Commerce Development Services
    • Page Speed Optimization Services
  • Buy Newspaper
Search
tagDiv support
  • Become a member
  • Sign in
  • Home
  • Showcase
    • Newspaper Showcase
    • Newsmag Showcase
  • Support
    • Newspaper Forum
    • Newsmag Forum
    • Blog
    • Documentation
      • Newspaper Documentation
      • Newsmag Documentation
      • The Theme API
    • What’s New
      • Newspaper
        • What’s New in v 11.5
        • What’s New in v 11.4.3
        • What’s New in v 11.4
        • What’s New in v 11.2
        • What’s New in v 11
        • What’s New in v 10.4
        • What’s New in v 10.3.7
        • What’s New in v 10.3.2
        • What’s New in v 10.3
        • What’s New in v 10
      • Changelog
        • Newspaper
        • Newsmag
        • tagDiv Opt-In Builder
  • Services
    • Web Development Services
    • Web Solutions & CMS Development
    • Web design & Front-end Development
    • E-Commerce Development Services
    • Page Speed Optimization Services
  • Buy Newspaper
Home Newspaper Social Share Buttons in Blog Posts

Social Share Buttons in Blog Posts

Posted in: Newspaper
Post count: 25
iamarunbrahma
#56919
Jun 30, 2015 at 12:25 am

Hello I am using Newspaper 6.1 wordpress theme. I want to add “Share on Whatsapp” button in blog posts which will only show in mobile and tablet devices. And also I want to remove the “Share on Pinterest” button in blog posts. Rather I want to add a “Pin it” button in all images in blog posts so that any one can pin the images on Pinterest. Just like this: http://prntscr.com/7mv8yz . I dont know how to do it. Can you please help me to fix all these? Thanks in advance.

Post count: 322
Bryson T
#56927
Jun 30, 2015 at 1:25 am

Well, you’re not “Fixing” anything, you’re customizing things.

Here’s what you can do. Mind you, these are only steps and locations; you need to know how to use CSS and HTML to actually perform the changes:

Adding WhatsApp & Removing Pinterest: The code for the default sharing blocks are in newspaper/includes/modules/td-module-single.php and there are two sections, one for above and one for below the post. They’re just links added to a variable so remove what you don’t need or change it as needed.

I wanted to add Reddit and remove Pinterest so I deleted the Pinterest blocks from both, created a td-social-reddit class for the background color, and changed the icon in the <i> element to td-icon-reddit and added the styles to the Custom CSS panel in the theme settings (to avoid overwriting on updates).

If the WhatsApp button uses a share URL and not a javascript function, it’s simple enough to copy the Google Plus button code in each location and adjust the URL in it and even add variables to it like I did with Reddit (See example on my site: Single post on my site showing the sharing buttons with Reddit and no Pinterest)

Please note that the default sharing buttons in that file all include some javascript inside of <script></script> tags within the chunk of code. This is primarily for handling the popup behavior of each link. Removing it or using your own JS without such a function will make clicking the share link open in the current full browser window, taking users away from your site.

Adding Pinterest to Images: There are several free and premium plugins that handle this. I suggest you implement one of them after removing the default Pinterest share button as described above.

These aren’t difficult changes to make, though. If you’re familiar with coding then it should be self-explanatory how to complete the steps above. Good luck!

Post count: 25
iamarunbrahma
#57126
Jun 30, 2015 at 10:42 pm

Hi Sir, I am not good in coding so I am messed up all the way. This is my website: http://www.kickscoop.com I removed the pinterest and google+ share button from blog post. Now i want all these things to be customized in Social share buttons:

1) Adding a “Share on Whatsapp” button both in top and bottom of the post. Also customize the buttom to look green and have whatsapp icon (Whatsapp Share URL: whatsapp://send?text=The text to share! [Got it from Stackoverflow] )

2) Remove the Classic Facebook like and Twitter tweet button from bottom sharing buttons and also remove the boxed part. Both the sharing buttons present above and below should look nearly the same. Also after clicking “Tweet on Twitter” the share url should popup, not open it in the same tab.

3) “Share on Whatsapp” button should be visible only on tablet and mobile devices but not in desktop devices.

Sir, Can you please help me to customize? If you can just edit the codes and share it with me or I can mail you my login credentials so that you can make change directly from my admin panel if you wish. Thanks in advance

Post count: 322
Bryson T
#57127
Jun 30, 2015 at 10:49 pm

The share links are opening in the same window because you have altered the code and somehow broken the default behavior. Newspaper comes with share links that open in a popup. Use the original files to revert the remaining links back to their default state.

Free WhatsApp WordPress Plugin
Use that plugin for WhatsApp integration, or search for others.

The classic Facebook and Twitter buttons can be removed from the theme settings panel. Go to Post Settings > Sharing to administrate those options.

Post count: 25
iamarunbrahma
#57365
Jul 2, 2015 at 12:50 am

Thanks for the help Sir. Sir I dont want to add any plugin for whatsapp. I want to have an inbuilt share on whatsapp button, like this site: http://www.storypick.com/ They are not using any plugin rather they have inbuilt “Share on whatsapp” code. So I wish if you could help me to make some changes in code so there I will have “Share on Whatsapp” button both above and bleow blog posts (It should be visible only in tablet and mobile devices). Thanks in advance

Post count: 7909
Alin [tagDiv]
#57477
Jul 2, 2015 at 2:54 pm

Hi,

You need custom work to implement whatsapp share button(or replace a theme default share button) as the theme doesn’t have this share option and we cannot provide any type of custom work at this time as we work hard on development, updates and support. If you don’t know how to do it I suggest to hire a freelancer to do it for you from sites like – http://studio.envato.com/
Here you can find the default share buttons if you want to add your own – http://screencast.com/t/gMF05PywvYTv

Thanks!

Post count: 322
Bryson T
#57596
Jul 2, 2015 at 11:20 pm

I agree with @alin_vlad. If you don’t want to use a plugin and don’t understand the code to do it, you need to hire a developer for the work because it’s not a support issue.

Good luck.

Post count: 23
yasirhashmi15
#58741
Jul 9, 2015 at 12:21 pm

Hello Bryson T,

Just add this in your css.

.td-social-stumbleupon {
background-color: #ff4e2e;
}
.td-social-stumbleupon .td-icon-stumbleupon {
font-size: 15px;
position: relative;
top: 2px;
left: 1px;
}
.td-social-reddit {
background-color: #7db3ef;
}
.td-social-reddit .td-icon-reddit {
font-size: 15px;
position: relative;
top: 2px;
left: 1px;
}
.td-social-whatsapp {
background-color: #60b82d;
}
.td-social-whatsapp .td-icon-whatsapp {
font-size: 15px;
position: relative;
top: 2px;
left: 1px;
}

And add this to td_module_single.php

<i class=”td-icon-stumbleupon”></i>
<i class=”td-icon-reddit”></i>
<i class=”fa fa-whatsapp fa-lg”></i>

Hope solves your issue 😉

Thanks,
Yasir

Post count: 25
iamarunbrahma
#58762
Jul 9, 2015 at 2:43 pm

Thanks

Post count: 17
hasgerdas
#70373
Sep 22, 2015 at 5:27 pm

I think the solution above doesn’t work anymore – it seems obsolete.
Could you please share the new place to put the code?

http://screencast.com/t/gMF05PywvYTv

Post count: 7909
Alin [tagDiv]
#70470
Sep 23, 2015 at 8:47 am

Hi hasgerdas,

You can add a new share button in td_module_single.php file – http://screencast.com/t/GHu7VlJe6Xt

Thanks!

Post count: 44
jcarr99
#75632
Oct 23, 2015 at 3:05 am

Just began messing with this and everything seems to be functioning BUT… I Added this to my css as stated above…

.td-social-stumbleupon {
background-color: #ff4e2e;
}
.td-social-stumbleupon .td-icon-stumbleupon {
font-size: 15px;
position: relative;
top: 2px;
left: 1px;
}
.td-social-reddit {
background-color: #7db3ef;
}
.td-social-reddit .td-icon-reddit {
font-size: 15px;
position: relative;
top: 2px;
left: 1px;
}

I added the following to td_module_single.php

<i class=”td-icon-stumbleupon”></i>
<i class=”td-icon-reddit”></i>

I must have missed something becuase I can click on a blank space and the link will share on reddit and stubleupon but the button does not appear on the page. Could someone help me out with this? Do I need to have an actual image for this … kinda lost.

Post count: 44
jcarr99
#75633
Oct 23, 2015 at 3:05 am

  • This reply was modified 10 years by jcarr99.
  • This reply was modified 10 years by jcarr99.
Post count: 7909
Alin [tagDiv]
#75709
Oct 23, 2015 at 11:05 am

Hi jcarr99,

Here you can find an example how to add a share button – https://forum.tagdiv.com/topic/linkedin-button/
It should work also in your case. You will have to use a font awesome plugin like Font Awesome 4 Menus and use font class for icon – http://fortawesome.github.io/Font-Awesome/icon/reddit/ – http://fortawesome.github.io/Font-Awesome/icon/stumbleupon/

Thanks!

Post count: 44
jcarr99
#75856
Oct 23, 2015 at 10:49 pm

Thanks Alin,

Is it possible to add these icons without the font awesome plugin? Could I host the icon locally and then add it to the css?

Post count: 7909
Alin [tagDiv]
#75984
Oct 26, 2015 at 9:20 am

Hi,

You could use sprites and use custom css to add a background instead of an icon. Something similar like the we use for social counter – http://screencast.com/t/7Hg5sNe9J – http://screencast.com/t/2yCMl4zs8wGN
Or you can add new icons to the theme fonts – http://screencast.com/t/059z1oelgSb

*go to https://icomoon.io/app
*button “import icons”, import from newspaper.svg (in /images/icons/);
*Select your icons and copy – http://screencast.com/t/62BMZmEh – http://screencast.com/t/hxTzPkSy
*button “generate font”, button “download”;
*copy the 4 files (.eot, .svg .ttf .woff), in “icons” folder in the downloaded zip file, rename icomoon.* to newspaper.*, replace old files.

I suggest to use a plugin if you don’t have basic experience or to get someone to help you with this.

Hope this helps!

Post count: 44
jcarr99
#76092
Oct 26, 2015 at 2:20 pm

As always, thank you for the detailed explanation and assistance with this. I’ll begin working on in later today and update the results.

Respectfully,
Jonathon

Post count: 45
mrtran
#95584
Feb 18, 2016 at 5:07 am

Hi bros,
I used code of StumbleUp Badge

code here

<su:badge layout=”6″></su:badge>

<script type=”text/javascript”>
(function() {
var li = document.createElement(“script”); li.type = “text/javascript”; li.async = true;
li.src = (“https:” == document.location.protocol ? “https:” : “http:”) + “//platform.stumbleupon.com/1/widgets.js”;
var s = document.getElementsByTagName(“script”)[0]; s.parentNode.insertBefore(li, s);
})();
</script>
, but it not synchronized with others icon, see here:

http://www.screencast.com/users/livingnomads/folders/Default/media/e417eda2-f5a4-46d4-9aee-79e37097fddd

I need css for square of StumbleUpon.?

Can you guide me? Thank you!

Post count: 22421
Bogdan B.
#95654
Feb 18, 2016 at 1:50 pm

Hello,
Unfortunately you cannot target the icon with css as the code creates an iframe. The code uses a different type of implementation that the one in our theme as it uses javascript not html. Iframes cannot be targeted with css. These are the icons provided for the specific widget: https://www.stumbleupon.com/dt/badges/create if there is no square icon, then you cannot change it.
Thank you!

Post count: 45
mrtran
#95688
Feb 18, 2016 at 3:43 pm

Thank you so much Bogdan B.!

Viewing 20 posts - 1 through 20 (of 20 total)
You must be logged in to reply to this topic.
iamarunbrahma
Support Hours (GMT+2)

Monday - Friday:
8:00 AM - 17:00 PM

Documentation
  • Newspaper
  • Newsmag
Facebook Instagram Twitter Youtube
Welcome to the Community! This is our main Support Center and, also the place where you can make new friends, people just as passionate about websites as you are. Don’t hesitate to ask for help as we are here for you. Thank you for buying our products!
Contact us: contact@tagdiv.com
  • Home
  • Blog
  • Forums
  • About us
  • Support policy
  • Privacy Policy
© tagdiv.com | Proudly made with by tagDiv. All rights reserved
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-advertisement1 yearThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement".
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
CookieDurationDescription
_ga2 yearsThis cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors.
_gat_gtag_UA_43963494_11 minuteThis cookie is set by Google and is used to distinguish users.
_gid1 dayThis cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visted in an anonymous form.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
CookieDurationDescription
IDE1 year 24 daysUsed by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile.
test_cookie15 minutesThis cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE5 months 27 daysThis cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website.
YSCsessionThis cookies is set by Youtube and is used to track the views of embedded videos.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
CookieDurationDescription
CONSENT16 years 5 months 26 days 13 hours 25 minutesNo description
yt-remote-connected-devicesneverThis cookies is set by Youtube and stores the user's video player preferences using embedded YouTube video.
yt-remote-device-idneverThis cookies is set by Youtube and stores the user's video player preferences using embedded YouTube video.
SAVE & ACCEPT
Powered by CookieYes Logo