- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- NewspaperBest Of Forums
- NewsmagRequirements for Newsmag
- NewspaperHow to Make the Site Faster
Oh okay… Sorry, I appologize for being rude to you. I thought you were someone who “worked” here (maybe with Customer Support), hence my frusteration and confusion at what you were saying at times.
Sorry.
Wait for Lucian or Marius to get in tomorrow.
I think they need to update that code on their docs page you’re referencing, which pulls list of the CSS and JS, which is what you’re looking for.
I don’t work here, just helping people as I’ve been doing webdev since 1994 and using WordPress since it launched in beta.
Sure, if you want to pay me to replicate the steps, would be happy to. “My” guide does not include those steps, as I NEVER edit the core code, and I only use compliant WordPress functions to optimize the functions.php file and well known suggestions for htaccess directives, etc.
I never made those instructions you refer to, so I’m going to pass on any help. Sorry to have offered; I likely only added to the confusion. Sorry about that.
I’m sure one of the other contributors here using that “hack” might be able to help. Likely you will want to post the question in that thread, as the hack you’re looking to do has nothing to do with theme support, or my suggestions for PageSpeed improvement.
Sorry, I can’t be any further help on this topic. Perhaps the person who suggested that hack might be able to help – try posting in that thread for help from those of us contributing suggestions for pagespeed improvements. Maybe the person who posted the hack will follow up for you on what he/she did to use that element you’re trying to use.
And again, the tagdiv speedbooster code and plugin has been updated for September, so the July hack may no longer work. But I’ve already said that, so I’ll stop talking now. 🙂
Okay, well https://forum.tagdiv.com/pagespeed-guide/ is where I got this reference from, and it was suggested by “you” guys. The post date is July 20, 2014 which I would say is fairly new and should still be aplicable as of this date, as I see no reason why it should not be. And I’m sure if you bothered to replicate these steps to see what was wrong, we would be able to come to a conclusion already.
All I want is a fix for this. I’m following “your” guide to achieve removing render blocking css/js – using the TagDiv Speed Booster plugin as set out in: https://forum.tagdiv.com/pagespeed-guide/
I followed your instructions and it did not work. The only line of code that gives me a fatal error is “add_action( ‘wp_print_scripts’, ‘td_inspect_scripts’ );”. And that is also the line of code that enables me to see a list of all the ids for all the css and js (needed for the next step).
So I ask again, please help me get through this step successfully.
I never suggested adding that code to the functions.php file, so it might have been somebody else; obviously if it’s causing an error, it doesn’t work. That may have been posted by somebody using the OLD version of the theme and the OLDER version of the Tagdiv Speedbooster plugin, which has been recently updated, so that suggested code may no longer work. hence the error you’re getting.
Anything which tells you to edit core WP code should NEVER be done, in my opinion. “Generally.” But you know what you’re doing, so have at it.
Always check the DATE on any post which suggests changing theme code, in some way, outside of normal wordpress functions such as I use, and line that up with current date/version of theme and plugins. So, if something worked with v1 of a plugin, it might not work with v2 of a plugin, “generally” speaking.
-
This reply was modified 11 years by
simchris.
Okay… Well I just tried it with ALL the plugins deactivated and it still gives me the fatal error…
I’m simply following your instructions on removing render blocking css/js – using the TagDiv Speed Booster plugin by adding the code :
function td_inspect_scripts() {
global $wp_scripts, $wp_styles;
echo ‘registered scripts<br>’;
foreach ($wp_scripts->queue as $handle) {
echo $handle . ‘ | ‘ . $wp_scripts->registered[$handle]->src . ‘<br>’;
}
echo ‘registered styles<br>’;
foreach ($wp_styles->queue as $handle) {
echo $handle . ‘ | ‘ . $wp_styles->registered[$handle]->src . ‘<br>’;
}
}
add_action( ‘wp_print_scripts’, ‘td_inspect_scripts’ );
into Functions.php as you have stated… And “generally,” I do know what I am doing. I followed your steps to a tea.
That is part of the main WordPress install and not part of the theme, so I’d likely start by turning off your plugins, then turning them back on one by one to see if you still get that error.
You generally do *NOT* want to edit the core WordPress files inside admin, or includes, unless you know what you’re doing.
-
This reply was modified 11 years by
simchris.
I get the error:
Fatal error: Call to undefined function add_action() in /home/xxxxx/public_html/wp-includes/functions.php on line 4643
Line 4643 is: add_action( ‘wp_print_scripts’, ‘td_inspect_scripts’ );
If I take that line out, my site starts to work again but I don’t get the list with the id for all the css and js on my WP dashboard.
Please help.
Yup. I actually changed mine to 50 recently on couple of sites which have photos and no illustrations, but 60 is what I’ve used for quite some time and works perfectly for my needs. Using 60 removed the “you need to optimize your images” warnings from PageSpeed. 🙂
deactivate all plugins; clear any cache; turn off mod_pagespeed if being used
upload new files, new plugins,
turn on plugins. Done. 🙂
Author rank with rel=author is 100% dead. 🙂
The theme supports various schema.org markup, and the latest (brand new this week) version of YOAST SEO has whole bunch of added support for microformat data but I’ve not had a big block of time to dive into that in depth. It’s on my to do list, actually, for this coming week 🙂
Right now I’m in midst of playing with mod_spdy and a new wildcard SSL cert, and connecting that to mod_pagespeed correctly (waaaah).
Child themes are indeed handy. Christopher recently said he doesn’t use them because of the pagespeed slowdown in CSS importing, if I understood him right, which is valid but it does prevent things like this. If you’re a heavy modifier of files, each update will be painful…
Child themes basically make WP use the version of the file in the child theme rather than the parent theme’s, if one exists. Hence your changes would survive updates.
Also, not all of those files can be modified in a child theme (I believe td_wordpress_booster.php can’t, for example). For those ones, you would have to copy the function in question into your child theme’s functions.php, make your changes, and rename the function. Then either change all references to the function in other files, or it’s a hooked action or filter, unhook the parent functions and hook yours in. (There are a few tutorials out there for this.)
Even if you use a child theme, you would want to watch for updates that affect functions and styles you’ve changed and do your changes over again, but it’s not as big a deal.
A block 10 is also included in the latest update, so you’d want to rename your custom one to avoid it being overwritten.
More screen shots to let you see all my tips working as they should…

Make sure every thing is in green for a fast site and a great pagespeed score..
If you notice every thing on my server side is in green and in the 90’s that make my server FULL optimize for the best performance… with all this ur WP will be running great and ur server as well..

Hi,
1. To place your ads in the sidebar you will need first to create a new sidebar in which you can add your sidebar ad or add the sidebar add into an existing sidebar, like this: http://screencast.com/t/nM5tELrP
Here is how you create a new sidebar: http://screencast.com/t/eATlwEHGE0C
Here you will have to ad the code for the sidebar ad: http://screencast.com/t/MO7gdQiOv
After this edit the page you want to have the sidebar ad on to and set the sidebar like this: http://screencast.com/t/hQGcO8BIf
If you want another sidebar on the left besides the one on the right, you can add it like this: http://screencast.com/t/woCxVdjX
This could help: https://forum.tagdiv.com/ads/
2. Check this topic and guide:
* https://forum.tagdiv.com/pagespeed-guide/
* https://forum.tagdiv.com/topic/pagespeed/
Also search the forum for tips and suggestions regarding speed there are many topics covering different issues and difficulties you may encounter.
3. Then only featured image effect we have is using post style: https://forum.tagdiv.com/topic/newspaper-v-4-0-topic/
You could try to use a plugin for this.
Hope this helps!
Thanks
One note is that while using AdSense for testing PageSpeed Insights lowers your score, that is the tested score, not the actual score for ranking signals, which discounts the advertising from their own network in calculating the speed for their purposes.
Put another way, Google doesn’t really lower your ranking based on speed for loading their own content on your site, as related to their ad system(s).
So, test with AdSense OFF, but you can then switch ads on, but choose text ads vs image ads (in your AdSense account), to derive minimal revenue from your site effort (neccessary for most bloggers and newspaper/magazine sites). Additionally, using only two ads vs 3, does help with overall user experience.
Anecdotal: I had same issue with light box on my main business site (not running WordPress). We worked hard to explicitly conform everything to the validator back in 2011, but now with the CSS3/HTML5 stuff the validator throws a LOT of errors, hence why the HTML5 validator is labeled “experimental.” It tells me my light box pop up code isn’t supported in HTML5, and yet it works and is correct for CSS3/HTML5, but not CSS2. Soooo, even with correct doc types, etc., it gets confused on some stuff. It’s also a bit funky with mod_pagespeed elements. I got our main site to only throw 2 errors simply by changing couple of things (oh, like the old ASCII code for the trademark symbol should be the four number version not the old three number version, etc.).
That may not help, but Lucian can help sort it if he can see link to your website page.
Here is somemore tips on what can give you a very bad google pagespeed score…
1. Ads (Google,amazon, etc) Ads really put a slowness on ur site that’s why i don’t use any ads on my site what so ever.
2. Sliders make ur site look very nice but they make ur site slow as well and i don’t use any sliders on my site.
3. Social sharing Bottons is something every one want on there site to get more traffic,but there is a lot of social sharing plugins that make ur site very slow because they don’t render correctly also they not coded good,if you want too use social sharing bottons on ur site my advice is to use the build in theme sharing bottons are find a good coded social sharing bottons like what i done that you will not even notice there even on ur site when it’s loading.
Recommendation from me for social sharing plugins as follow…
4. Ultimate Social Deux plugin i’m using on my site it’s coded correctly and very lightweight and look very nice on ur site with out slowing ur site down, in this case you will have no issues what so ever on ur pagespeed.
This plugin is not FREE you can buy it from this URL http://codecanyon.net/item/ultimate-social-deux/6556073
5. A lot of unnecessary plugins can also put a lot of stress on ur site speed and server and make problems with ur theme etc,try to find a plugin that have many things in one,in this way you cut down the total of ur plugins also the load on ur server.
6. A good hosting company is the main factor of a good google pagespeed as well,some people will go for very cheap hosting to save money but they don’t get what they pay for,some cheap hosting don’t care about ur speed etc so before you pay for any hosting make sure you know what they giving you and if there good are not.
My site is hosted with the same company that i’ve host my radio server and domain with and they give you more then your money can buy..they called “Listen2myradio.com” i was with them for a few yrs now and i never had problems what so ever with them and my site and radio always up 99.9%..
My hosting company give they users the max on every thing with they hosting packages which will make ur WP site run smooth with no issues with speed..
PHP Memory Limit: 256M
MySQL Version: 5.5.37
PHP Version: 5.5.14
PHP Max Upload Size: 2000M
PHP Max Post Size: 8M
More tips coming soon..
Hi,
I have checked your site on https://developers.google.com/speed/pagespeed/insights/ and found that you don’t have any unmoved JavaScript, did you managed to solve this problem?
Please let me know.
Thanks
@Ecofame there is a lot of bad in removing every single white space from ur site,it’s bad for “User Experience” on tablets & phones,it’s hard on the user to tap on things if they very close together and that’s one of the things google pagespeed always warns people about don’t make things too close to each other because it’s not good for “User Experience” from mobile devices…
It’s good to remove some white space like what i done too my site,but ur asking to remove it all from the front page then when someone visit ur site from a phone and say they have big fingers it will be a nightmare for them to even browse ur site from there phone..just one of my tips i’m passing on too you…
The most important plugins you need to even get this close to getting those scores..as follow
1.tagDiv speed booster
2.Speedbooster Pack Plugin (Don’t use the feature Disable all above CSS options on mobile devices) all the other features can be use but it all depends on ur site.
3.WP Super Cache Plugin this work better with the theme and don’t cause any issues with the theme code.
4. Optimize Database Plugin http://wordpress.org/plugins/rvg-optimize-database/
5.EWWW Image Optimizer Plugin
6.CloudFlare Go to “performance settings tab” and make sure you choose every thing in there…
A.CDN & Full optimizations
B.Simplified
C.Rocket LoaderThis play a very big important role in ur google pagespeed test as well make sure it’ turn on..
D.Auto Minify (JS,CSS,HTML)
E.Minimum expire TTL Make sure it’s set to 5 days not more are less..
Because my post is about removing the “render-blocking CSS and JS files”from google pagespeed test…
I’ll like too show you my results that you can see all my tips in this post work and if you take them and use them in the right way, I sure think you will get the 95% score like me as well…here is some more screen shots of my results to let you know what will give you that 95% score for mobile and desktop..


Ah, you’re using a child theme. I don’t use child themes due to these kinds of issues, because the css is basically a “redirect” to the main CSS, and Google ‘frowns” on CSS redirects even though WordPress loves them.
So, that might or might not be the issue. The style.css I was referring to is the “main” one in the main theme, not the child theme.
I no longer use child themes, to achieve better pagespeed, so I guess I’m out on any help for this one 🙂
Done without mod_pagespeed upto some extent. !
After playing with sub domains, Amazon CDN, etc., I found it was just simpler to load all the images locally so that things like compression, mod_pagespeed, etc. all actually work. I’d rather have the compression, progressive convert, for faster load than the tiny fraction faster load via subdomain or sub->CDN.
Frankly, a lot of that works if you are CNN or TIME magazine, but for most “small” sites and blogs, not so much.
But, this is the point of testing all the options then evaluating benefits vs drawbacks. I spent the entire month of January this year doing nothing but this kind of thing. Now I’ve gotten a tad cynical about it.
I look forward to all this shite being in the past, as it’s brain numbing. 🙂
-
This reply was modified 11 years by
simchris.