Hey,
Just one thing, will it start counting views from the time, I activated this option ? Because other settings like Ajax post views count under post setting is and “Use 7 days post sorting” under block setting is already ON for last 10 days.
Also, if it counts the view since it is enabled on the homepage, then how does it show even those 4 posts?
Does “activating this option” mean creating this option or activating it on the homepage?
Anyways, I will wait for it to work well.
Thank you very much for your insightful comment.
@Chris: No issue! Happy to know that you don’t use Mobile theme. Now I will keep using Mobile responsive version of desktop theme in peace till they add some more features to it 🙂
Hello Ing Geek ,
Happy to see you here 🙂
Now I am really upset about my server. Just one month before, I shifted from Hostgator shared hosting to this new Managed WordPress hosting site powered by Google Cloud. I just read that it uses NGINX caching.
(Does it mean I can’t use Apache server based optimization techniques written by Chris> Though the system status under theme panel says it’s CentOS/Apache Server )
In this way, it must be a very powerful and strong platform. But then why is it having ” very large waiting and blocking time on timeline resource”? Is it because I asked them to deactivate all caching from my website?
I have asked a set all the questions raised by Chris above to my hosting provider and now waiting for their reply ( Saturday , Sunday support off) . My server is based in London and they do offer assistance for the modification of PHP variables.
I have also gone through your Spanish optimization code and have noted it down. I am not sure which code I should use but will surely give it a try. ( Sometimes I really think I should be a computer engineer , not electrical )
Let me if you know if you have any other optimization ( or any other ) feedback for my site.
Thank you for your insights.
-
This reply was modified 9 years by
Nano.
Yes! You make it and I will do everything to make it the most upvoted product on Producthunt 🙂 😀
Okay, I got it, but perhaps my previous comment was little confusing or my ability to comprehend your most recent answer is not good 🙂 So, let me try to make few of my queries simple.
1. I understood the use of caching but couldn’t understand the difference between server side caching and wordpress side caching.
2. Yes, currently I am not running any caching plugin just to check, test and increase the performance without the use of it but then is it possible to get 90+ Pagespeed score without WP Super cache and cloudflare etc ? ( Because I have seen that once I enable these two, my Pagespeed goes above 90 even now)
3. Based on my request ( because of not getting mobile theme run because of server side strong caching ) , my hosting provider has completely disabled all kind of server side caching for my site. Should I ask them to re-enable it?
4. I don’t know why my mobile theme was conflicting with server side caching. So, Is there any way in which I can be specific to instruct only following features under server caching so that I can be able to use mobile theme in future ( currently I disabled mobile theme and using default mobile responsive version of desktop theme?
5. Is it really necessary to use mobile theme because I can see that it kills various necessary features like smart lists on mobile theme ask users to reload page everytime they want to next list number which is very irritating on users poitn of view.
Please try to answer these questions after indulging few of cookies from this cute cookies jar 🙂

Thank you.
Thank you
Hey Chris,
Thank you for taking time and making real effort to help me out. 🙂
There are so many layers to your answers and everytime I read it, I find something new to look for.
Here is something important, few days back, I had issues with TD Mobile plugin theme. It was showing mobile responsive version of desktop theme on mobile but not the mobile plugin version. In an answer to my related thread ( read here) , Andrei told me that it’s happening because of strong caching enabled on my hosting site.
And hence I asked my hosting provider to disable caching and they disable all types of caching for my domain. Though after that mobile plugin theme started working but after using it for a while , I felt that mobile theme needs many more featured now. So, I disabled it.
I doubt that these Gzip/deflat things must be part of those caching system and which is currently diabled .
What do you think? Should I ask them to re-enable it?
I will also send the GTMatrix parametre to my hosting prover .I will also ask to check following things:
The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header: Right?
I will re-read your all your comments and then prepare a mail for my hosting service privder.
Let’s see how it goes. Thank you very much again.
Ha ha ha.. I wish if it can be served through IPs 🙂 😀
Hey Chris,
Thanks again 🙂
Also, check to see if the author’s FB page is private or public.
Yes! this can be a big thing to notice. I never thought in this way. The other “Change in Name” is something that I am noticing for quite a long time ( 2-3 months)
Let me work on all your suggestion before making any further reply to it.
Thank you very much though 🙂
Hey nairolf2013,
You may be true about this but just 4 weeks before when I was using old theme , I usually had 94-95 PAGESPEED SCORE on my site, do check this screenshot here: https://snag.gy/fY1TJb.jpg
But yes, a fast server must be having an edge over slower one. 🙂 😉
Cheers,
Hey Chris,
Gracious !!!
Thank you for the detailed explanatory reply. As far this system status ( https://snag.gy/P2ApmR.jpg) to be believed , my host run on Apache server and hence the HTACCESS codes written by you under this thread should be valid.
As per recommendation, I started my HTACCESS file with :
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_dns_prefetch
</IfModule>
and then I added following code after default rewrite codes of WordPress:
AddType text/javascript .js
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
# BEGIN Expire headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2500000 seconds"
ExpiresByType image/jpeg "access plus 2500000 seconds"
ExpiresByType image/png "access plus 2500000 seconds"
ExpiresByType image/gif "access plus 2500000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
ExpiresByType text/css "access plus 700000 seconds"
ExpiresByType text/javascript "access plus 700000 seconds"
ExpiresByType application/javascript "access plus 700000 seconds"
ExpiresByType application/x-javascript "access plus 700000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
ExpiresByType font/truetype "access plus 2500000 seconds"
ExpiresByType font/opentype "access plus 2500000 seconds"
ExpiresByType application/x-font-woff "access plus 2500000 seconds"
ExpiresByType image/svg+xml "access plus 2500000 seconds"
ExpiresByType application/vnd.ms-fontobject "access plus 2500000 seconds"
</IfModule>
# END Expire headers
# BEGIN Cache-Control Headers
<IfModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</IfModule>
# END Cache-Control Headers
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
<IfModule mod_alias.c>
RedirectMatch 403 /xmlrpc.php
</IfModule>
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?tomatoheart.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
The last code is to prevent hotlinking. Now as far I can read understand from your comment , the above written codes must have taken care of the required gzip/deflate settings through HTACCESS and should add up to 20 points to my score , but it didn’t happen 🙁
I still have these settings under htaccess and have also modified functions.php but the icrement in Pagespeed is only 2-4 points. On other side, I do feel my backend and homepage little faster while using after adding all these things. But there is no such impact on GTMAtrx score.
As you have mentioned :
Enable compression for the following resources to reduce their transfer size by 424.8KiB (79% reduction).
When I have already configured HTACCESS to compress it, why is it still showing there? AM I doing something wrong?
About Image optimisation thing, I use “Insanity plugin” to reduce file size while uploading the image and”optimus plugin” to compress it. the JPEG compression is set to 70 because I am worried to set it to 50 ( as recommended by you) because of the need of image quality. Since I am doing various changes, I will force regernerate and optimise images once I finalise all design aspect of my site.
Though I also tried checking GTMatrix points for my post page ( https://gtmetrix.com/reports/tomatoheart.com/vW3rCLXw ) , but it’s even worst than the homepage ( PAGESPEED SCORE: 53, YSLOW: 51)
about your second reply ( server side optimisation) , Being fron a non-programmer background, I will copy this comment and send it to my hosting provider to ask if they need to do anything.
Do you think there is something you can comment on my current situation.
Thank you.
-
This reply was modified 9 years by
Nano.
One more thing, I noticed that I can’t notice the changed made in desktop login on Mobile browser. Currently I have mobile theme plugin disbled but perhaps mobile ajaz login has seperate php file. Can you please tell me which file I shoudl edit to add Facebook login in mobile version.
Thank you.
Sometimes, even a single smiley in a message can turn a normal human into an angel 🙂 ( Don’t know if it really mean something! )
Anyways, since I am using a managed wordpress hosting in which new wordpress for domain/subdomain will need extra subscription per month for that. So, I won’t be able to do that.
So, I will keep fighting to find any soultion for it. I totally understand your limitation and have nothing but respect for the whole TagDiv community.
Let’s see when I will actually be able to find any soultion.
Thank you very much.
Hi, I continued working on it and finally applied this code here: https://snag.gy/Ysg6DV.jpg
Now the resultant output is much closer to what I wanted: Look here: https://snag.gy/jyhxJY.jpg
Now I only need to move the ” Create an account” button little above and you can’t deny helping for this 🙂
Have a look
Thank you.
Hey Catalin,
I am sure that those files /codes must have been modified in last two years, I am not sure whether support people or their heltping nature or support rules have also changed in these two years. Going to the strict rule book, no cusomizations are allowed by going to the past experience and community building book, you guys have always helped us ( users ) in helping for small customisations.
That’s why Lucian had helped two years back and probably you will help me now too 🙂
taking help from your screenshot, I added the short code here: https://snag.gy/aeiqy5.jpg
The full line that I added is:
' . do_shortcode('[fbl_login_button redirect="" hide_if_logged=""]') . '
In result , I get this in ajax login box: https://i.snag.gy/J0Y6oK.jpg
As you can notice, the only issue now is to move “Connect with Facebook” down below “LOGIN” text. What should I do for this? Should I change the postition of code in td_login_modal.php or add some code in custom CSS.
Please try to look at this.
Thank you.
Hi Bogdan,
Yes we already had conversations through email ( and that’s why I mentioned that TagDiv has already tried) but I have already tried each and everything except fresh installation.)
But then what does it mean by the fresh installation. This is already a new theme and has been freshly installed 2 weeks back and I am facing this issue since the new theme installation.
I have tried installing default theme or previous theme and all works totally fine because there is no Ajax based login on any other theme. And as far mydomain.com/wp-admin login is concerned , it’s working very fine.
So, either there is some conflicting code in ajax login.php or it’s getting some redirection command from somewhere ( means by any old unused deleted plugin codes). Though I have already repaired, optimized my database and have deleted old Wordfence plugin related files and many other files using grabage collector plugin.
In the very first solution to this issue , TagDiv support has told me to check with Hosting provider because they noticed ( see this image that the theme can’t access admin-ajax.php . When ajax pagination is used the theme makes many requests at this file and server security module may treat it as a thread and it will be banned.
I asked about this my hosting provider, they replied that they can’t see any issue from server side and-and A 403 error is normally linked to how you have file permissions setup and the theme might have changed a few permission while activating.
Can you please check if any such 403 errors are still coming? Where should I look for file permission? then I also tried following method suggested under many threads to stop redirection:
One possible solution, I found to the similar problem is this:
Go into PhpMyAdmin to your WordPress database
Find the table named wp_usermeta
Find the rows titled session_token
Delete the value associated with it
(Mind you the value is huge and your browser might freak out. I did it by clicking ‘edit’ for that record first, then toggling the null value for the field on and off, selecting the empty field and pressing delete a couple of times to make sure, and then hit save)
But it didn’t work either. I am not sure if it’s the theme issue or not , but it happens only with this theme and only when using Ajax login. Can you tell me where will I find this Ajax login.php file to see if there are any redirection option?
Can’t we stop this redirection by writing some code? I have also changed/renew the SALT security codes under WPconfig.php but nothing worked till now.
I am just waiting for one angel who can look and rectify this issue.
Thank you.
Thank you Bogdan for the reply. Yes I have already tried these optimisation tips on NewsPaper , but couldn’t notice any big jump in Pagespeed score or so.
Let’s wait for the Chris’s reply if he ever notice this thread.
Thanks again 🙂
Just noticed one thing- The number of popular posts that for last 7 days was selected to 6, but it’s currently showing only 4 posts on my home page. ( Have a look here: https://snag.gy/MNjc8i.jpg )Why is it so? Doesn every post published in last 7 days need to get views more than some fix post views number? I have published more than 10 posts in the last 7 days.
What can be causing this issue. Please help. Thank you.
Successfully implemented thank you.
Yup!
Thank you 🙂
Yup! I read that and replied you again there. Thank you.
Hello Catalin,
thank you for the reply.
The WordPress Social plugin that was discussed and solved by Lucian here: was also neither tested nor recommended by Tagdiv but your amazing team and the community still helped the thread creator to solve it and make it work.
So, you or any other concerend team support team member may want to solve it again with reference to the current theme. It was also told that in future you are going to integrate social login plugin in future updates. You must be agreeing to the need of social plugin in today’s time. Should we expect it soon?
About the https://developers.facebook.com/docs/facebook-login/web/login-button , this button is very small and won’t look good as per themes UI but if you will look at the solution provided by Lucian in the past thread, he made it look as intergated and amazing as it should be. ( here is the link : https://drive.google.com/file/d/0Bzax_bFhmTjZeXR0enlOT01OR00/view )
Try to help me else it’s toally fine 🙂
Thank you.
Hi Bogdan,
I have already setup the get-header related soultion provided by your and Andrei. I haven’t expereinced nor been reported by any of my authors for any such new errors but even before, it used to appear only few times. Let’s see if gets solved.
and yes, based on https://forum.tagdiv.com/system-status-parameters-guide/ , my hosting system is 2 times more capable than the recommended requirment set written there. My memory limit set to 128MB by hosting provider based on my request and it’s google cloud based capable managed WP hosting service.
Do you think in any possible way the “get header” issue can cause “fatar error” too ? just asking.
I will keep you updated if I will get reported again about this.
Hello Devs,
Are these method still valid? I have tried to implement the process that Lucian suggested in his reply but the screenshot that he had used to show the location is now not working and is invalid. Here is his screenshot link: http://screencast.com/t/a8B0TRtck
I am using WP Facebook Login ( Link ) and it supports following code :
<?php do_action('facebook_login_button');?>
It also supports the following shortcode:
[fbl_login_button redirect="" hide_if_logged=""]
Please let me know where should I add this code? Which code should I insert there the php code or the shortcode? As some commenter suggested above, it should be added here: public_html/wp-content/themes/Newspaper/parts/header/top-menu.php
but then the guy who insitiated this thread said that the code should be added “td_login_widget.php”
I am super confused. This is very important thread and have been referred by many of you under various posts. It will be really great if you can update the solution based on the current requirement.
Thank you very much.
Hi Bogdan,
Thank you for the reply. Actually I am facing fatal errors like this as shown in the images below. It’s not just a error log, but it actually affects my work whenever it appears while working with editing posts or any other options.
Image link 1
Error Link 2
I am not sure if it’s the same issue whose solutions are discussed by you both above but when I asked for resolution to my hosting service provider, they come to the following conclusion after working on my issue. They said:
Our systems admin has concluded that this is not a host related issue, but it’s linked to your theme:
PHP Fatal error: Call to undefined function get_header() in /home/4XXX_ES/web/mydomain.com/private_home/wp-content/themes/Newspaper/index.php on line 6
I am confused about this issue as if to whom should I ask for solution. Can you relate your solution with the screenshot that I shared above?
Please help. Thank you.
Thank you 🙂
Hi, I tried to understand the solution suggested by you, but unable to understand few things.
Why such a well coded theme like Newspaper is unable to locate get_header() function ? If it’s a known error why haven’t you tried to fix it permanently. I never noticed such issues in previous theme.
Should I concern about any thing which causes this error?
About the soultion implementation, my Index.php starts with
<?php
/* ----------------------------------------------------------------------------
the blog index template
*/
get_header();
//set the template id, used to get the template specific settings - this was the old home.php template
$template_id = 'home';
//prepare the loop variables
global $loop_module_id, $loop_sidebar_position;
$loop_module_id = td_util::get_option('tds_' . $template_id . '_page_layout', 15); //module 1 is default
$loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
and it doesn’t have any define ‘display_errors’ as mentioned in the solution:
My question is in our themes index.php:
Where do we need to add the following code:
<?php ini_set('display_errors', 0); ?>
<?php
/**
* @package WordPress
* @subpackage Ars_Theme
*/
if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: http://" . $_SERVER['HTTP_HOST'] . "");
/* Make sure that code below does not get executed when we redirect. */
exit;
}; ?>
Please help. Thank you.