- NewspaperHeader Builder
- NewsmagHeader styles
- NewsmagHeader ads
- NewspaperHeader ads
- NewspaperHeader styles
- Apitd_api_header_style::delete
- Apitd_api_header_style::update_key
- Apitd_api_header_style::update
- Apitd_api_header_style::add
- ApiAPI – Header style – Introduction
- NewspaperSearch setup for custom post type
- NewspapertagDiv Composer – Website Manager
- NewspaperBookmark – Save For Later
- NewspaperWooCommerce: Happy “Add to Favorites!”
- NewspaperModal Popup
- NewspaperFlex Block Settings Guide
- NewspaperPosts Loop Element
- NewspaperHow to Add a Logo in Newspaper
- NewspaperDefault Category Settings
- NewspaperWhen tagDiv Composer is Not Working
Hi
@orlando please check this topic where my colleague Lucian provided a possible implementation: https://forum.tagdiv.com/topic/how-to-hook-hit-counter-into-amp-header/
Thanks!
Hi,
If you want to hide the menu only for one page in particular you will need the page id. you can get the page id like so: http://screencast.com/t/xFCgxR1eNDr
then you can use this code and simply change the id number for it:
.page-id-605 .td-header-menu-wrap-full{
display:none!important;
}
Thank you!
Hello,
I would like the Style 3 header, see here: https://forum.tagdiv.com/header-styles/ (I particularly like the top bar (where the weather is) and the main nav (main menu) to both be coloured)
However, I would also like both to have a different colour line underneath each, like this one http://demo.tagdiv.com/newspaper_magazine/ which is green.
Is that possible to combine?
Hi Support,
I use the Newspaper Theme 7.3 but when i change option in theme panel as header style, categories setting, block setting, ADS, mobile theme i’ve change option setting and save setting but setting not change.
– header style can’t change
– ADS can’t empty text in text area for insert code
– Modules/Block when switch to on can’t change back to off
– many option on/off setting when switch to on can’t off
– some option setting can change but when i need to change again it’s not work.
i install WP super cache plugin follow by theme document but still same problem
Tagdiv would need to give us a shortcode for the hit counter, which we could then add to the normal filter function you shoukd already have to add shortcode to header or footer.
Thanks Bogdan, I didn’t actually log the post headers or check if it was the ajax view count or the ajax load more posts, thanks for pointing that out.
Hello @dritanleka
Upon checking your website, I couldn’t find any advertisement code in your website source code.
You can use this tutorial https://forum.tagdiv.com/header-ads-adsense/
-
This reply was modified 9 years by
Amit.
See the theme docs on using the ad system to place your own ad banner in the header; and use normal html to link your graphic to whatever page you want. Simple 🙂
Theme docs explain how to use ads
The NGINX vs Apache thing is a tad confusing with the latest web servers; for example I run Apache because I’ve been doing so for 20 years and know it’s tweaks; NGINX works a bit diffferent; and if I didn’t have a legacy 16 year old website to deal with we’d been running NGINX.
Funny thing, even with the new system, NGINX runs in front of Apache to serve http/2 for https, which we have not yet implemented. But the pages are served by Apache (for now).
Your server is likely running opcache/memcache with NGINX, which is good. It speeds up files requested over and over, as I stated. Local caching on your site is different, as it caches the stuff being queried for each page to speed things up since there is no lag time waiting for dbase to serve and render the page (technically with php/wordpress there are no actual “pages” on your site, they all are built dynamically).
So, you likely have a CentOS/Apache setup (as we do here), but NGINX being used for caching.
Generally, you should just tell your host you need your domain optimized for WORDPRESS, and they should be able to do the rest on the backend as far as caching, gzip/deflate, etc.
No support on weekends isn’t good for hosting provider; means they are a reseller and not a “true host” — they are reselling another company’s hosting, which is very common.
In any case, it’s a process — but some of the stuff is NOT theme specific, it’s WordPress specific, meaning the server side tweaks, and general optimization of time to live, caching, expiration headers, image compression, etc., are NOT specific to ANY theme.
So, good to make Google your friend and explore the many articles out there on “speeding up WordPress” — sites like WPBeginner, WPMU, etc.
Hello, I am using Newspaper theme 7.3
Activated plugins-
Mobile theme
js composer
wp-super cache
Advanced Database Cleaner
tagDiv Social Counter
WP Smush
Yoast SEO
Using default htaccess provide by you
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</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
WP- Super cache is configured using this https://forum.tagdiv.com/cache-plugin-install-and-configure/ tutorial
Cloudflare settings are configured using https://forum.tagdiv.com/cloudflare-cdn/ this tutorial
Still my scores are
PageSpeed Score
(86%)
YSlow Score
(57%)
Page Load Time
6.5s
Total Page Size
1.35MB
Requests
101
Please help me to get better speed.
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.
Okay well even without the mobile theme working, i have just fiddled around and suspect its because the header ad was turned on, do the resizing options on the documentation auto recognise what device is being used if it isn’t google adsense being used?
Gzip/Deflate must be properly setup and enabled at the SERVER level; above the domains, above your website; not from htaccess, theme, or WordPress. Two different things. From my test it looks like it is partially setup, but some setting you have is not compressing javascript and css files, it would appear.
a) gzip/deflate must be ON and working; then the directives tell it what to do.
b) for mod_pagspeed — that won’t work unless your host is running mod_pagespeed — and if they don’t have gzip/deflate properly setup it’s highly doubtful that mod_pagespeed is running.
As noted in various places in my long long long thread; you need to go research what some of my things DO to see if they apply to your server setup, otherwise they won’t do anything.
So, again – YOU need to contact your HOST provider, and
a) have them properly setup gzip/deflate — as right now it’s not compressing ALL your content, only some if it, which is not normal.
Your page does show this:
Results
Url : https://tomatoheart.com/aishwarya/10-p-v-sindhu-first-indian-woman-win-olympic-silver/
Parameter Value
Gzip/Deflated enabled ? YES - The url is serving compressed content.
Compressed Size 41.45 KB
Original Size 327.66 KB
Savings 87.35 %
Response header
Content-Encoding: gzip
But as it clearly shows on GTmetrix; and you should provide this to your host –as I stated — to get them to fix, along with the vary accept encoding:
Enable compression for the following resources to reduce their transfer size by 401.2KiB (80% reduction).
Compressing https://tomatoheart.com/wp-content/themes/Newspaper/js/tagdiv_theme.js could save 391.9KiB (80% reduction).
Compressing https://tomatoheart.com/wp-content/plugins/ytsubscribe/ytSubscribe.js could save 4.0KiB (69% reduction).
Compressing https://tomatoheart.com/wp-content/plugins/wp-facebook-login/public/js/facebook-login.js could save 2.3KiB (66% reduction).
Compressing https://tomatoheart.com/wp-content/plugins/akismet/_inc/form.js could save 382B (54% reduction).
That is what is hurting your site speed/rating.
So, that’s about all the help I can provide there
In our setup, we have the server setup to serve gzip/deflate and vary accept encoding without having to add the <IfModule mod_deflate.c> section you have in your file.
Sorry not a better answer 🙂
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.
Also, your host really should be serving up this one properly:
The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header:
I had to get this setup properly on our new server that went live Aug 5, also. SO, have your host fix that; and send them that section with the files — basically the css and js should be serving the “vary …” thing. And that is also part of the proper setup of the gzip/deflate.
OK,
If you want to hide the menu completely, you must realize the logo is also part of the main menu container. The content will not move up if you only remove the menu: http://screencast.com/t/yOuyMmboz
if you want the content to move up, you need to remove the whole header content including the search button and logo like so:
http://screencast.com/t/RhVLLVsVDRO
Here is the code needed:
.td-header-menu-wrap-full{
display:none!important
}
if you want to keep the logo, I suggest selecting a different header style where the logo is not part of the menu container: https://forum.tagdiv.com/header-styles/
Thank you!
Hello gilli,
For your mobile mode, if you want to get rid of the header, please try the code below.
The code is ->
@media (max-width:767px){
.td-menu-background{
display:none
}
.td-grid-wrap{
padding:0;
}
.td-menu-placeholder{
display:none;
}
.td-header-bg{
display:none;
}
}
The result -> http://screencast.com/t/kQLB7VkXFOqO
and if you want to replace the placements for your logo and header ad, please try the code below and place it in Theme panel.
The code is ->
.header-logo-wrap{
float:left!important;
}
The result -> http://screencast.com/t/cm6Hlaeu
Please notice that places were reversed due your RTL mode.
Thanks for your understanding!
What i want is to remove the entire header on mobile (logo, search, menu).
I tried everything you suggested in other threads, but nothing worked.
Also, i’d like to move the logo to the left, and the header ad to the right (on desktop). Wasn’t able to do that either.
Thanks
Well we have no reports of the get_header issue causing fatal errors. if you do a search through this forum you will find quite a few topics regarding this issue but none reported fatal errors. In most cases there was only an error message in google’s structure data testing tool but nothing more. So I can;t say for sure your errors come from the get_header issue. You will have to wait and see if they come back even with the fix in place.
Thanks
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,
Please be more understanding. We get lots of messages and it’s hard to keep track of everybody. You say you already sent us the url via email but how can we recognize which one is you? You username here on the forum does not match any email address we received mails from and we have not received any email from strategic.cyberintelligence@gmail.com which is the email used to create the forum username…The site you provided is not found in any emails we received either so how can we know which one is you? I assume you are referring to the screenshot email from the other topic but we have not received any screens at all via email. Please make sure the address you sent the emails to is contact@tagdiv.com
Now for the matter at hand: You use header style 10 that shows exactly the size you upload the logo in: http://screencast.com/t/Pn5hGM5c please make sure you select the right size when uploading a logo and not a thumb of the logo from this WP setting here: http://screencast.com/t/I5Yy9R1303
Thank you!
PS: This is just a copy of my comment posted on this link, as many times support team suggests to open a new thread for any issue. that’s why I created this new thread.
Hey,
Following the thread here https://forum.tagdiv.com/topic/where-to-put-this-code/ I tried implementing 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
Are these method still valid?
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.
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,
I cannot say for sure if the errors are related. It looks like a hosting error to me.
Did you increase your system status parameters according to our guide? https://forum.tagdiv.com/system-status-parameters-guide/ it could e a memory issue or it could be related to the get header but we have no reports of this yet. Just making assumptions. sorry.
Try the method me and Andrei posted above to make a redirect to the homnepage on the get_header code and see if you still get the errors.
Thanks