No search results were found in Documentation!
CSS for line under menu, to be entered in Theme Panel -> Custom CSS:
.td-menu-background:after {
background: transparent !important;
}
Spacing and border between menu items:
.sf-menu > li > a {
padding: 0px 0px 0px 0px !important; /* top, right, bottom, left*/
border-right: 1px solid #eee !important;
}
Adjust values as desired. Note that at present you don’t have to think about first and last child of the menu as long as you don’t remove the search button (because it’s not a list item).
Hi,
This two files should be moved when using speedbooster: http://screencast.com/t/4mWjxgJMq
Please deactivate all plugins and then check to see if these two files are moved.
If this is still happening please give us wp-access so we can check this and send you wp-admin user and pass at contact@tagdiv.com and also include an link to this topic.
Thanks
Hi,
For the default post style, you have to add the comments template into loop-single.php file, like this: http://screencast.com/t/A2kFaUiXi
This is the line you have to add: <?php comments_template('', true); ?>
Also go to single.php file and change this: http://screencast.com/t/twEebRktgC0
You will get this result: http://screencast.com/t/UDt5hXijKHrQ
Use this custom css to remove the space from below and add some space above:
.next-prev {
padding-bottom: 25px !important;
}
.single-post .comments #respond {
padding-bottom: 0px;
}
Thanks
Hi,
I’m not sure if I understood right what you want, I believe you want that the post author to appear after the date of the post and not at the bottom of the posts where the author box it’s positioned. If this is way you want it please make sure you remove the comment from the loop-single.php and loop-single-1.php files. Edit each file and remove the two slashes “//” like this: http://screencast.com/t/VLf3DkCMw
For the other post style 2/3/4/5 you will have to edit the single_template_2/3/4/5.php files and remove the slashes “//”, like this: http://screencast.com/t/T8R4KFZhhnZl
If you want the author to appear after the date switch the line between them, like this: http://screencast.com/t/VJeSEWnwM4
Then go to td_module.php file and do this: http://screencast.com/t/kIj3H0yWMW like this: http://screencast.com/t/ZzzuRQLpfGG
After this add this custom css in theme panel > custom css field:
.single header .meta-info time {
font-style: normal !important;
margin-right: 0px !important;
}
You should get this result: http://screencast.com/t/58xJxjP1pDUW
You can disable the “author box” on post pages from theme panel > post settings: http://screencast.com/t/GM3BPolH
Hope this helps!
Thanks
I keep a folder with copies of the files I hack each update so I can remember them at a glance, a text file with my additions to put at bottom of functions.php and note as to which section by line number x-x to remove; and a text file with cheat sheet of the search/replace for the style.css file. Not too painful. Kind of started when I had existing read/hit counter and needed to update the module to load the existing “field” vs the one used by Newspaper for hit counting. Then it was uncommenting the author byline each time in the main post file. Then it was the custom font loading. Well, there you are. As long as I have my local “cheats” folder, I can usually open two windows with both old stuff and new version of theme and then just top to bottom change stuff in new update folder, and then upload to server and it’s like nothing changed for the stuff I modified.
And, benefit is the style redirect issue that Google doesn’t like with child themes, and much easier to deal with any custom css over-rides as well as issues with tagdiv’s in house speedbooster plugin, etc.
At least this has been my experience đ
Hi there, i dont want to open a new post since my problem is the same as Shashank.
I was able to implement all the css and js to the speed booster file, but cant find the IDs for
http://www.techizm.com/âŠ-includes/js/jquery/jquery.js?ver=1.11.0
http://www.techizm.com/âŠs/jquery/jquery-migrate.min.js?ver=1.2.1
Could anyone help me?
Thanks in advance!
Hi TheMediumUTM;
Thank you again.
Now it looks good and I like it. As you can see there is little problem that is margin from the left and the space between the header and block slide.
When I checked how the site apears on mobile the margin left problem seem clear.
This is what i did. I put all the css codes together, changed px values, copied all of them and pasted in theme panels costom css area.
.span1, .span3, .span4, .span6, .span8, .span9, .span11, .span12 { margin-left: 20px !important; }
.block-title { margin-bottom: 10px; padding-bottom: 10px; }
.td_mod_wrap .meta-info {display: none !important;}
.td_block_wrap { margin-bottom: 0px; padding-bottom: 10px; }
.td_mod_wrap { margin-bottom: 10px; }
.td_mod1, .td_mod2, .td_mod3, .td_mod4, .td_mod5, .td_mod6, .td_mod7, .td_mod8, .td_mod9 { margin-bottom:
10px!important; }
.td_mod_wrap .thumb-wrap { margin-bottom: 10px; }
.wpb_row { margin-bottom: 10px; }
.td_mod3 { min-height: 65px; }
Regards
Ecofame
So you pretty much want all the whitespace gone at once? That’s a lot of CSS; here’s my shot at it.
First, still keep this:
.td_mod_wrap .meta-info {
display: none !important;
}
Now:
.td_block_wrap {
margin-bottom: 0px;
padding-bottom: 0px;
}
.td_mod_wrap {
margin-bottom: 0px;
}
.td_mod1, .td_mod2, .td_mod3, .td_mod4, .td_mod5, .td_mod6, .td_mod7, .td_mod8, .td_mod9 {
margin-bottom: 0px!important;
}
.block-title {
margin-bottom: 0px;
padding-bottom: 0px;
}
.td_mod_wrap .thumb-wrap {
margin-bottom: 0px;
}
.wpb_row {
margin-bottom: 0px;
}
.td_mod3 {
min-height: 65px;
}
This removes all the whitespace that I could see on your homepage. As others have said, I actually think this is way too dense a style. Having some whitespace is good!… Play with the above numbers until you’re happy with it.
This last bit is the whitespace between vertical elements. It’s experiemntal and I haven’t tested it thoroughly. It’s tricky to get rid of this because it does not play well with the grid layout that the whole theme is designed around (and doesn’t change the overall site width, e.g. your main menu). I would personally avoid using it.
.span1, .span3, .span4, .span6, .span8, .span9, .span11, .span12 {
margin-left: 0px !important;
}
Again, change that number and if necessary separate the individual span classes so you can adjust their margins individually.
Note that it looks like you have a row after your video in the page editor, which is the source of the whitespace between that and the footer. You also have a text widget in the sidebar, which is the source of the whitespace above the socials widget.
There may also be whitespace elsewhere on your site that’s not on the homepage. Most of it would be caught by the above, I think…
It should work in IE as I’m using IE right now, and I can go to the Google site and the fonts work.
So, likely you need to load them from your style.css file vs using the theme panel. Meaning get the CSS from the above link I provided, from the CSS link, grab the CSS, and put at bottom of your style.css file; edit the style.css file to change the headline or whatever to the font you want, then edit the functions file to remove calls to google fonts from there.
eg. the css file you need to copy FROM:
<link href='http://fonts.googleapis.com/css?family=Quattrocento:400,700' rel='stylesheet' type='text/css'>
Kind of advanced, but that’s how I’m loading Open Sans and it works 100% of the time because Google provides the correct font for the platform.
Ideally, the point I was making for Marius is that you should be calling the Google version of the font in the theme, and the theme should be calling that from Google. It has nothing to do with “web safe” fonts, where the specific font would not be installed on a Windows PC.
Not sure that helps. But since you use that as your corporate ID font, it might be simpler to make the custom fix to ensure it always works, as I do with Open Sans.
-
This reply was modified 11 years by
simchris.
Check with GoDaddy support; they may not have that option activated. Remember their servers host thousands of sites PER server, so they have to limit certain features for anything using system resources.
Hmmm… GoDaddy seems to have removed the page in their support “what features from mod_pagespeed does GoDaddy support….” … not helpful.
When you look at your page source do you even see the mod_pagespeed code at bottom, and signal, etc. ?
You should contact GoDaddy, as mod_pagespeed might not work from sub-domain, or you may need to setup domain mapping in the config file which tells mod_pagespeed it can load stuff from subdomain of main domain.
see stack overflow item on this topic
http://stackoverflow.com/questions/21617388/mod-pagespeed-with-multiple-domains-or-subdomains
and RTFM
https://developers.google.com/speed/pagespeed/module/domains#shard
đ
I just want to clear things up here with my post,i ask @Lucian to check my css code that remove space between the blocks to make them come more closer.
CSS code to bring the blocks closer to remove my white space in the middle of the blocks.
.td_block1, .td_block2, .td_block3, .td_block4, .td_block5, .td_block6, .td_block7, .td_block8 {
padding-bottom: 0px !important;}
CSS code to remove the white space between the rows to make it look much better on the homepage…
.home .td-grid-wrap .wpb_row {
margin-bottom: 0px;
}
I’m not sure the 2nd CSS code will work for any one else because it was made for my site,but every one should wait to monday when the staff is back to help you like how they help me to fix my white space issues…
Hi,
@gnoe
Please use it like this:
.td-grid-wrap .wpb_row {
margin-bottom: 0px;
}
Also add !important after the margin property like this, margin-bottom: 0px !important; if it dose not work.
I have made that code for @Steven’s site, send me your sites’s URL if this dose not work for you, I will provide the right css code.
Thanks
Hi,
1. Looks fine to me, this is “Ubuntu” on your page: http://screencast.com/t/tyYTqVEex and look’s to me like it dose on google fonts page: http://screencast.com/t/BsD9l6Xvi the point is that the fonts do change, please use the one that looks fine, from I have noticed the one that you are using now looks fine and supports the turkish characters.
2. This usually happens because of the speed booster plugin which move the css and js at the bottom of the page structure so that the page will load faster, this is why the theme blue color appears first then changes, because of the cascading property of css, the same regarding fonts.
What you can do is to use the method I suggested before and change the color and the fonts directly into the css style-sheet which will make your colors and your fonts to load first and stay that way. You could also deactivate the plugin if you don’t need it.
3. Regarding the theme panel’s custom typography I have made some tests with it to check if it’s working well and noticed that works just fine for widgets title:
This is what I have chosen: http://screencast.com/t/M9V7tFarfe
This is the result: http://screencast.com/t/suckL0bGpf
This only changes the widgets title, not the block title, for that you will need custom css.
For the menu items also works: http://screencast.com/t/Qr3UD6bMeo
Try to change it yourself like this, I’m not sure why it dose not work for you, it may be due to some plugins or the speed booster plugin which overwrites the settings from theme panel, try this without any plugin activated and check if works.
Like I said before the best solution would be to replace the fonts and color as you like and need into the style.css file, this will solve both issues if you want to use the speed booster plugin or try to see if this works without the plugin.
Sorry for the delay, hope this helps!
Thanks
Hi,
Use the css without the last comma, that is why this css it’s not working, the classes have not changed so should work fine after the VC update also:
.td_block1, .td_block2, .td_block3, .td_block4, .td_block5, .td_block6, .td_block7, .td_block8 {
padding-bottom: 0px !important;
}
Thanks
I just update the VC plugin but it seem that the Css code to take out the white space on homepage from blocks don’t work any more..
.td_block1, .td_block2, .td_block3, .td_block4, .td_block5, .td_block6, .td_block7, .td_block8, {
padding-bottom: 0px !important;
}
Can i get a fix for this please…
Yes. That is how WordPress themes work. That’s how you have all those smaller size images for your sidebar, homepage, categories, related items bottom of post, recommended fly out, etc. — where did you think all those thumbnails came from? They are created by WP and the theme when you upload an image.
If you wish to remove the sizes you don’t use — meaning, if you don’t use certain modules, you can comment out those sizes in the functions.php file, I believe, and also a trick I’ve advised the past 10 months on the forum has been to choose the three sizes in the WP settings > media setting (not theme panel), to the three sizes you use the most (matching modules you’re using), to not make extra sizes.
You can see the sizes created to match each module in the documentation, which is highly recommended to read, here:
https://forum.tagdiv.com/modules-and-blocks/
Without any theme at all, WP will always create three additional thumbnails. With each theme, thumbs are created to match the sizes you might possibly choose to use for the specific theme layout or module.
You can search the forum for tips and help on removing image sizes you don’t use, also.
Hope that helped.
Some of the things I noticed on his site was not using the gravatar, which is a major slowdown, and also he’s limiting the number of thumbs on page, such as not having four big “related stories” images at bottom of post, and as I suggested he’s using only the share buttons vs the number shares buttons.
I just checked one of my pages, which does not have js/css minified, and has gravatar, and has an ajax slider top right AND four images for related posts. This page has a “90” on PageSpeed Insights with both AdSense, and Disqus running. And one of those things is loading Google Analytics even though I am not. I’m not using a caching plugin either. So, in my case I need to consider changing the related posts, figure out how to cache or save the author image locally vs from gravatar, and possibly remove the big image slider top right of each page … which would reduce payload of page by a lot. And I need to minify my main js and style.css files, and retest. I haven’t looked at this since before I got sick, and have been working on something else which pays the bills vs the fun stuff, but need to get back to that obviously đ And even worse, I don’t think I’ve updated the theme to 4.x on the test page (still 3.9.2). Doh. I suppose I should catch up on following my own advice! My non WP site has 97/100 for desktop, and 93/100 mobile.
What blows my mind, as it were, is the 99/100 user experience rating for mobile that Shashank has. May I say “wow” đ
Hi, Mehidi
I just posted a comment about this on another post which I’ll repeat here as my empirical wisdom on the topic of suffering Google issues the past 20 years. đ
————-
Christopher Simmons
August 27, 2014 at 8:50 pm #19552
As you may know from my own prior posts in the pagespeed topic, you may find it more helpful to test for speed with stuff like adsense, external things like addthis/sharethis or shareaholic, disqus, turned OFF, as there is not much you can do about those elements for speed beyond async loading. This gives you what I call your âraw scoreâ which is better to see what your work on optimization actually does.
The âtheoryâ in the webdev industry is that if you get your raw score taken care of, then when you switch back on the googleverse stuff which invariably shows problems with their own systems vis a vis pagespeed, you can presume Google âsubtractsâ their own content from the âfunctional scoreâ ⊠in using speed as a âsignalâ for ranking, beyond user experience.
Just for those pulling their hair out on this topic (been there!) đ
My other advice: donât eat toast around your keyboard, unless you want to keep a key puller, alcohol, swabs, and a can of compressed air handy!!
———————
For Google fonts; use my trick mentioned elsewhere …
1) grab the CSS from google which is being loaded from your functions.php for the fonts you’re using;
2) paste the css into bottom of your style.css file, so you’re loading the CSS in your own file and not loading externally — does 2 things, removes the css loading from their server with the funky expiration, versioning, etc., and reduces external load by one file!
Okay.. this one was confusing me, and I’m going to blame lack of sleep this week. Using theme panel I changed the font size for the sidebar headers (e.g., Categories) as I wanted them a little smaller (14px) and ALL CAPS. No problem. However, once the size is changed, the underline creates a space between the box background and the line rule (border).
Was trying to sort out which element to over-ride but how to over-ride with custom CSS to remove the white space. Changing the line-height has no effect (and speed booster is off).
Since some items have an h4 class, like <h4 class="block-title"><span>The Guru</span></h4> and some have simply <div class="block-title"> kinda confusing.
default seems to be
.block-title {
position: relative;
font-family:Montserrat,Helvetica,Arial,sans-serif;
border-bottom: 2px solid #4db2ec;
font-size: 20px;
margin: 0px 0px 26px 0px;
line-height: 32px;
font-weight: normal;
}
changing the margin only changed the spacing after the section, not within the section. So, it looks like the theme panel line height doesn’t over-ride the style sheet?
( I changed default font in style.css, obviously )
So, changing the line height to line-height: 28px; from the custom CSS panel over-rode the spacing so the lines would touch.
This originally started as question while I was figuring it out; decided to post in case anybody else was having an issue on this one đ
I tried many times to clear render blocking css and JS but not successful. I hope someone here will help me out.
Here is my speedbooster.php file
<?php
/*
Plugin Name: tagDiv speed booster
Plugin URI: http://tagdiv.com
Description: Speed booster for Newspaper theme - It moves the styles and all the scripts of the theme to the bottom. It also activates internal theme optimizations for better speed.
Author: tagDiv
Version: 2.5
Author URI: http://tagdiv.com
*/
/*
* 2.6 - fixed rendering bug on the loading of the page
* 2.5 - code improvements, newspaper 4 compatibility
* - makes most of the javascript files use defer parsing
* - better compatibility with revolution slider
* 2.4 - updated jquery version
* - support for https
* 2.3 - fixed warnings when trying to move javascript files that are not registered
*/
class td_speed_booster {
var $load_contact_form_7 = '';
var $load_google_fonts = '';
var $styles_for_footer = array();
var $async_js_scripts = array(
'contact-form-7',
'bbpress',
'woocommerce',
'site',
'devicepx',
'js_composer_front'
);
function __construct() {
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_hook'), 100);
add_action('wp_footer', array($this, 'wp_footer_hook'), 15);
add_action('wp_head', array($this, 'wp_head_hook'), 15);
define('TD_SPEED_BOOSTER' , 'v2.5');
}
function enqueue_scripts_hook() {
global $wp_scripts;
//$this->move_js_to_footer('bp-legacy-js');
//detect revmin - revolution slider and do not move jquery
if( !is_admin() and !isset($wp_scripts->registered['revmin'])){
if (is_ssl()) {
$td_protocol = 'https';
} else {
$td_protocol = 'http';
}
wp_deregister_script('jquery');
wp_register_script('jquery', ($td_protocol . '://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'), true, '1.11.0', true);
wp_enqueue_script('jquery');
}
//move styles
$this->move_style_to_footer('bbp-default-bbpress'); //bpress old
$this->move_style_to_footer('bbp-default'); //bpress
$this->move_style_to_footer('contact-form-7');
$this->move_style_to_footer('td-bootstrap');
$this->move_style_to_footer('td-theme');
$this->move_style_to_footer('google-font-rest');
$this->move_style_to_footer('woocommerce_frontend_styles');
//jetpack lost styles
$this->move_style_to_footer('jetpack-subscriptions');
$this->move_style_to_footer('jetpack-widgets');
$this->move_js_to_footer('themepunchtools');
$this->move_js_to_footer('revmin');
//bbpress
//remove_action( 'bbp_head', array($BBP_Default, 'head_scripts') );
}
function wp_footer_hook() {
$current_theme_version = '';
if (defined('TD_THEME_VERSION')) {
//get the theme version for style
$current_theme_version = TD_THEME_VERSION;
//on demo mode, autogenerate version hourly + day
if (TD_DEPLOY_MODE == 'demo') {
$current_theme_version = date('jG');
}
}
foreach ($this->styles_for_footer as $style_id => $style_src) {
echo "<link rel='stylesheet' id='" . $style_id . "-css' href='" . $style_src . "?ver=" . $current_theme_version . "' type='text/css' media='all' />\n";
}
}
function wp_head_hook() {
if (defined('TD_THEME_VERSION')) {
echo '<style>body {visibility:hidden;}</style>';
}
}
function move_style_to_footer($style_id) {
global $wp_styles;
if (!empty($wp_styles->registered[$style_id]) and !empty($wp_styles->registered[$style_id]->src)) {
$this->styles_for_footer[$style_id] = $wp_styles->registered[$style_id]->src;
wp_deregister_style($style_id);
}
}
function move_js_to_footer($js_id) {
global $wp_scripts;
if (isset($wp_scripts->registered[$js_id])) {
wp_enqueue_script($js_id, ($wp_scripts->registered[$js_id]->src), '', $wp_scripts->registered[$js_id]->ver, true);
}
}
function async_js_hook($url) {
//check to see if we have js
if (strpos( $url, '.js' ) === false) {
return $url;
}
if ($this->strpos_array($url, $this->async_js_scripts) === false) {
return $url;
} else {
return "$url' defer='defer";
}
}
private function strpos_array($haystack_string, $needle_array, $offset=0) {
foreach($needle_array as $query) {
if(strpos($haystack_string, $query, $offset) !== false) {
return true; // stop on first true result
}
}
return false;
}
}
new td_speed_booster();
And here is my function generated file
registered scripts
common | /wp-admin/js/common.min.js
admin-bar | /wp-includes/js/admin-bar.min.js
utils | /wp-includes/js/utils.min.js
svg-painter | /wp-admin/js/svg-painter.js
wp-auth-check | /wp-includes/js/wp-auth-check.min.js
itsec_file_change_warning_js | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/file-change/js/admin-file-change-warning.js
itsec_strong_passwords | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/strong-passwords/js/strong-passwords.js
devicepx | http://s0.wp.com/wp-content/js/devicepx-jetpack.js
wpuf-subscriptions | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/subscriptions.js
wp-color-picker | /wp-admin/js/color-picker.min.js
jquery |
media-upload | /wp-admin/js/media-upload.min.js
thickbox | /wp-includes/js/thickbox/thickbox.js
wpuf-chosen | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/js/chosen.jquery.js
wpseo-admin-global-script | http://mydomain.com/wp-content/plugins/wordpress-seo/js/wp-seo-admin-global.min.js
td-wp-admin-general | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/general.js
td-wp-admin-panel-js | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/wp-admin-panel.js
suggest | /wp-includes/js/jquery/suggest.min.js
registered styles
admin-bar | /wp-includes/css/admin-bar.min.css
colors | 1
ie | /wp-admin/css/ie.min.css
wp-auth-check | /wp-includes/css/wp-auth-check.min.css
itsec_notice_css | http://mydomain.com/wp-content/plugins/better-wp-security/core/css/itsec_notice.css
wp-color-picker | /wp-admin/css/color-picker.min.css
wpuf-chosen-style | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/css/chosen/chosen.css
google-font-ubuntu | http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic
td-wp-admin-td-panel-2 | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/css/wp-admin.css
thickbox | /wp-includes/js/thickbox/thickbox.css
wpalchemy-metabox | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/content-metaboxes/meta.css
ithemes-icon-font | http://mydomain.com/wp-content/plugins/better-wp-security/lib/icon-fonts/icon-fonts.css
bbp-admin-css | http://mydomain.com/wp-content/plugins/bbpress/includes/admin/css/admin.css
jetpack-icons | http://mydomain.com/wp-content/plugins/jetpack/_inc/jetpack-icons.min.css
Here what my pagespeed test suggest
Remove Render Blocking Javascript
http://mydomain.com/wp-includes/js/jquery/jquery.js.pagespeed.jm.ocognCjcS2.js
http://mydomain.com/wp-includes/js/jquery/jquery-migrate.min.js.pagespeed.jm.mhpNjdU8Wl.js
http://maps.google.com/maps/api/js?sensor=true
http://maps.gstatic.com/maps-api-v3/api/js/17/15/main.js
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/frontend-form.js.pagespeed.jm.DduuMTRcHs.js
Optimize CSS Deliver of the following
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.settings.css,qrev=4.3.8.pagespeed.cf.DyIPD1r_80.css
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.captions.php,qrev=4.3.8.pagespeed.cf.VUw1T7K7S2.css
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/css/W.frontend-forms.css.pagespeed.cf.vemqQTxrMU.css
http://fonts.googleapis.com/css?family=Roboto%3A400%2C700
I am also using Dreampress which is on varnish cache. I enabled Page Speed Mod as well. No other caching plugin.
My Page Speed Score is 64 for desktop and 41 for mobile.
Further, Here is what i added in my httaccess
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedModifyCachingHeaders off
</IfModule>
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 604800 seconds"
ExpiresByType image/jpeg "access plus 604800 seconds"
ExpiresByType image/png "access plus 604800 seconds"
ExpiresByType image/gif "access plus 604800 seconds"
ExpiresByType application/x-shockwave-flash "access plus 604800 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
#ExpiresByType text/html "access plus 600 seconds"
#ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
Now please suggest me what to do for increasing my page speed. My site is damn slow. Please help me to correct the speedbooster.php file as per instructions. Special request ot Christopher for helping me out. Thanks
Hi,
Yes please remove the height you have set before and just use this custom css instead, I have tested it and should solve your issue:
.upme-column-wrap {
display: inline-block;
}
.widget_text {
margin-bottom: 0px !important;
}
Thanks
Ok FYI if interested, I reinstalled again yesterday because of the things Steven told me.
Well Chris- I still use the W3 Cache (page only) and wrote the rest of .htaccess by myself, like u posted in another thread. (little bit proud on myself that it did not crash đ )
Is everything ok with that or have any other suggestion?
See my current htaccess here:
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{SERVER_PORT} =443
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=W3TC_ENC:_gzip]
RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
RewriteRule .* - [E=W3TC_PREVIEW:_preview]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wptouch_switch_toggle) [NC]
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
AddType text/javascript .js
# 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"
</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>
# pass the default character set
AddDefaultCharset utf-8
# BEGIN Keep-Alive
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
# END Keep-Alive
#BEGIN GZIP
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
#END GZIP
#BEGIN CF ALLOW
Allow from 2400:cb00::/32
Allow from 2606:4700::/32
Allow from 2803:f800::/32
Allow from 2405:b500::/32
Allow from 2405:8100::/32
#END CF ALLOW
As you can see I had to add the keep-alive code and other stuff like gzip- because otherwise GTMetrix would complain about that.
http://gtmetrix.com/reports/cherrykoks.de/4DKTK3Af I guess I can not influence the the both points about cloudflare?
The only thing I’m little bit confused about, is the fact that the mentioned code
foreach ($this->styles_for_footer as $style_id => $style_src) {
echo "<link rel='stylesheet' id='" . $style_id . "-css' href='" . $style_src . "?ver=" . $current_theme_version . "' type='text/css' media='all' />\n";
in the booster plugin causes my strings. Can I change that?
And:
in the Pagespeed guide from tagdiv I read this:
The plugin will move the theme and recommended plugins js and css at the page bottom. If you have other plugins installed you have to modify the Speed Booster plugin file so it will also move those files at end of the page. In the next section you will learn how to accomplish this.
4.2 To get the list of registered css and js add the following code at the end of the functions.php file:
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’ );
SpeedBooster plugin ist runnin as you know, do I have to change that as advised?
The sentence with “If you have other plugins installed you have to modify plugin so it will also move those files”
Other plugins means = every plugin I’m using? No problem to add this code to functions.php – just wanna make sure if this is right.
Hi,
first you can’t do anything about the cache validation or anything with fonts loading off of google’s website, or anything loading from jetpack (or adsense, or addthis, or disqus, etc.) — as those elements live on somebody else’s server. Only solution is to remove them or workaround them (e.g., load google fonts on your site or CDN, or load the CSS from your own style sheet — you can google how to do this, as it’s a trick which has been used for couple of years — simply grab the CSS you’re loading from google for the fonts, then put it into your own CSS, then remove the “call” to that CSS from your style.css and/or functions.php).
For the remove query strings I would suggest this:
1) turn off all your plugins
2) make sure you put the remove query code at bottom of your functions.php file and have uploaded to server properly, replacing original file
3) test a post page and see if it’s working – it should work, unless you have conflicting element re-writing your code. Or, you didn’t put the code in right place with something else you’ve added to the functions.php file, or you have a missing or extra closing bracket (bad syntax). There are couple of ways to do this, but again – double check your code/syntax, which is #1 reason something doesn’t work – be careful what you copy/paste FROM … always use a proper plain text editor so it won’t introduce garbage characters.
4) start turning on plugins: pay close attention to any SEO plugin which may try to rewrite the css and js “positions” in the file
5) avoid using plugins which do the same thing – seo plugin with sitemap, and other sitemap plugin; seo plugin which rewrites location of your js and css and the tagdiv speed booster
6) once you find the conflicting plugin, you can sort out what to do for the version removal to work (and don’t have that in functions *and* use a version removal plugin at same time, AND an SEO plugin that rewrites your code AND the tagdiv speedbooster).
This is normal process to “debug” why something doesn’t work.
Hi, easier for me to copy stuff from my functions.php than find it, I’ll admit!
Here is my custom code in my functions.php file … not all of this may apply to you or anyone, but it’s what we do for our sites:
(I put this at BOTTOM of the functions.php file — NOT the top!!!)
/*CHRISTOPHER'S CUSTOM MODS - 1.12.14 rev1 */
remove_action( 'wp_head', 'wp_generator' ) ;
remove_action( 'wp_head', 'wlwmanifest_link' ) ;
remove_action( 'wp_head', 'rsd_link' ) ;
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
add_filter( 'pre_comment_content', 'wp_specialchars' );
function no_errors_please(){
return 'GET OFF MY LAWN !! RIGHT NOW !!';
}
add_filter( 'login_errors', 'no_errors_please' );
/* Disable YOAST SEO Admin Bar. */
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
function delete_enclosure(){
return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'jpeg_quality', create_function( '', 'return 60;' ) );
function remove_pingback_url( $output, $show ) {
if ( $show == 'pingback_url' ) $output = '';
return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
-
This reply was modified 12 years by
simchris.
Hi,
The disabling the top menu will not disable the mobile menu also, in your case this may be due to some plugins, please check this again.
1. Unfortunately that can’t be done easily, you can try to do it yourself if you like or you can hire a developer to do it for you.
2. Add this css in Theme Panel > Custom CSS to remove the menu items sub indicator:
.sf-menu > .current-menu-item > a, .sf-menu > .current-menu-ancestor > a, .sf-menu > li > a:hover, .sf-menu > .sfHover > a {
border-bottom: none !important;
}
.td-full-layout .td-menu-background:after, .td-boxed-layout .td-menu-wrap:after {
display: none !important;
}
.td-full-layout .td-menu-background, .td-boxed-layout .td-menu-wrap {
border-bottom: none !important;
}
.sf-menu li:hover ul, .sf-menu li.sfHover ul {
top: 48px !important;
}
Add this custom css if you want to style the menu for tablets:
@media (min-width: 768px) and (max-width: 1018px) {
.sf-menu li {
background: black;
}
.sf-menu > li > a {
z-index: 1 !important;
border-bottom: none !important;
}
.sf-menu ul .td-not-mega > a {
background: white;
z-index: 99999 !important;
}
}
Hope this helps!
Thanks