Hello,
Our website is https://pildat.org and we are using Newspaper 8.1.2 theme on our website. I have two problems on my website, it would be great if you can guide me how to solve these problems.
1-) For the first problem, please see this page
https://pildat.org/youth1/youth-representatives-call-for-revival-of-student-unions-from-the-new-provincial-government-in-sindh
If you notice on the side bar, just below the ad, there is a social counter that shows the no. of fans/subscribers to our social media pages. The problem is that Twitter and YouTube counter are working perfectly while Facebook counter has become static and not updating. I do not want to update my theme version to the current version, so is there anything we can do which can make the Facebook counter to fetch data correctly?
2-) For the second problem, you can see these two pages.
https://pildat.org/right-to-information1/landing-the-story-a-guide-to-using-rti-in-investigative-journalism
https://pildat.org/product/rti-045
The first link is a post page which calls the wocommerce product to display inside it via a woocommerce shortcode, while the second link is the direct woocommerce product page. The problem is with the sidebar.
If you notice, there is a blank empty space where an ad from Google should have appeared. All over the website, Google Adsense ads are displaying correctly without any problems, except for the woocommerce product pages or the posts where the woocommerce products are being displayed via a shortcode.
Can you please tell me what can be done to fix this problem?
Thanks
Hi,
1. Actually Facebook, Twitter and Instagram counts will most likely not work. Due to changes made by most socials on their side, we had to adapt the theme by updating to work with these socials
– https://www.screencast.com/t/ab0TgHLjt
– https://themeforest.net/item/newspaper/5489609 (changelog in the bottom half of the page)
So using older theme versions than 8.7.3 the social counter will not work. There were also various fixes in the theme when WordPress was updated, mentioned in the changelog as well. It would be best to try and keep both WordPress and the theme updates when updates are available.
The theme current version is 9.1. if you should consider to update here is a guide
– https://forum.tagdiv.com/how-to-update-the-theme-2/
2. From what I can see in both those pages the ads provide an error
– https://www.screencast.com/t/WuNXpiFlA6H
You could check some topics I found online about this (there may be others), could be helpful
– https://productforums.google.com/forum/#!msg/adsense/g-Ekt68_EXY/U2vEUQcYCAAJ
– https://groups.google.com/forum/#!topic/page-speed-service-discuss/20ujBgsYv4s
Thanks
Hi Simion,
Thanks for the reply.
1-) Well the twitter count is working perfectly so it is just Facebook that is not working. I do understand that you had to change some code. If you can tell me what code needs to be changed, I will edit the php files directly and will paste over the new code in them for the Facebook counter to work properly again.
Even if that is not possible for you to tell me, then can you just tell me the file which fetches the data from Facebook? I will update the file manually with static numbers to be displayed on my website.
2-) Regarding the error which you have showed, why is this error coming only when woocommerce product is being displayed? If I just remove the woocommerce product shortcode, then the ads display just fine.
1. From what I see the Twitter count is outdated too
– https://www.screencast.com/t/vBBhcV6uI7
You could download the latest theme version package from themeforest and install the social counter plugin from there. Test to see if it works.
2. The ads are displaying fine now – https://www.screencast.com/t/255U9DzPl
– https://www.screencast.com/t/Fyl6xJ9wgPGt
If you did something it seems to have worked. I have to say I never encountered something like this before, a connection between a woocommerce shortcode and Adsense ads.
Hi Simion,
Thanks again for the quick reply.
1-) The social counter plugin bundled with the current version of Newspaper is not compatible with my theme version 8.1.2. Can you please tell me which php file to edit to input the values there manually?
2-) Yes, I solved the ads problem. Though the links provided above did not help in solving the problem, but your provided screenshot about the error did point me in the right direction.
It turns out that the Woocommerce shortcode was not only pulling the product display into a page but it was also pulling the sidebar alongwith it, hence the conflict the code. I solved it by removing the Google Adsense code from Sidebar and pasted the very same code into custom ad5. So the ads got disabled in Woocommerce and only product was pulling in the post. And then on post page, I called the custom ad5 in the sidebar widget. So now the ads are displaying perfectly fine.
Thank you so much for helping me solve problem 2. If you can now just tell me the php file to edit the Facebook counter code directly, then I will be much grateful.
Hi,
Glad you solved the ad issue.
The modifications were made in the plugin for the social counter. The whole functionality in case of Facebook was modified, now it only requires an ID and no other information.
Maybe try to replace the Facebook case in the social counter plugin you have, with the one from the latest plugin
– https://www.screencast.com/t/F53GkXmoWd6
But maybe there were modifications in the theme files as well, can’t say for sure what has been modified in order to work.
Hi Simion,
Wow, replacing the code in case ‘Facebook’ worked like a charm and as you can see in the screenshot below, the updated count is now being displayed.
https://pildat.org/tagdivcounter.png
I just have two more questions regarding this.
1-) First, how to clear the social counter internal cache as it takes sometime to fetch the count likes. What I had to do in my case to reflect the change immediately was to update the Social pages id on the widget settings.
i.e instead of Capital PILDAT, I rewrote it as pildat and so the cache was cleared and new count was fetched successfully.
But my question is what is the proper way to empty the social counter cache?
2-) In the earlier screenshot which you shared, I noticed you are not seeing Facebook, Youtube and Twitter icons in the boxes. Why is that? Can you investigate? If you see my screenshot above, then all icons are visible atleast in my browser. (Using chrome on a Mac OS X).
Glad it worked.
1. In ideal situations with no caching plugin or maybe server cache, the counter will synchronize every 3 hours. Caching plugins for example may have a delaying effect in this matter.
If that happens try to clear the cache, or set a smaller cache expiration period (most caching plugins have this option). That way the cache will be cleared and rebuilt and the data will refresh.
2. The icons are not visible for me, tried with Chrome and Firefox. Quite unusual, CSS wise everything seems to be in order from what I can see, the image containing all the icons is also loaded, positions are alright
– https://www.screencast.com/t/13Nnps3ApvTs
I see you switched to a different counter style, still the icons are not displayed. I investigated with the browser inspector more, still can’t seem to figure out why this is happening. Maybe check if the image containing all the icons is there
– https://www.screencast.com/t/OCOHqdiLid0B
Hi Simion,
1-) Please see the attached screenshot.
https://pildat.org/wp-content/uploads/2018/10/filefoundrenamed.png
The file was there but it had a different name somehow. Since, I am using a Macbook with Retina display hence I guess I was seeing the icons @2x higher resolution file while Windows based users had problems with the icons. So I renamed the file back to its original name as shown in your screenshot, and this problem is also solved now. Can you please check it at your end once and see if the icons are visible?
2-)Secondly, yes I changed to a different counter style to introduce the Instagram page too without inducing a new line.
But can you please tell me how can I move the instagram icon / counter from 2nd to 3rd position please?
Hi,
1. That explains it, now I can see the icons just fine
– https://www.screencast.com/t/aoT42LNLz16S
2. Seems I forgot to give you a solution for the order of the socials, sorry about that. Simplest method would be with a simple CSS code, for example this will switch Instagram with Twitter
– https://www.screencast.com/t/zA4wWLTOGz
CSS code can be entered in the theme panel custom code section
.td_social_instagram {
position: relative;
left: 25%;
}
.td_social_twitter {
position: relative;
left: -25%;
}
Let me know if this works, or if you have more questions.
Hi Simion,
Thanks for the example code! So I put the following css code into my website and the result is just as per our expectations.
.td_social_youtube {
position: relative;
left: -25%;
}
.td_social_twitter {
position: relative;
left: -50%;
}
.td_social_facebook {
position: relative;
left: 25%;
}
.td_social_instagram {
position: relative;
left: 50%;
}
After putting the above code in, our custom css code lines have exceeded 1000 lines (including previous codes). Thats huge, but now after this, the site looks perfect. What do you think? Please give me your honest opinion?
Dear Simion, it was really an enjoyable experience working with you towards solving all my problems. You can now mark this as solved.
Thank You.