If Modified Since HTTP Header

the_modified_date() is a template tag that must used inside the loop, that is why it is not wokring for you. WordPress provide a action and filter hook to include or modify HTTP headers: send_headers action wp_headers filter But it doesn’t work for this purpose. For example, the next code is not working: add_action( ‘send_headers’, ‘cyb_add_last_modified_header’ … Read more

Setting Last Modified HTTP Header on static Home Page

Last-Modified header for visitors on the front-page It’s useful to see how the Last-Modified header is added to the feeds, in the wp::send_header() method. If we want to be able to use is_front_page(), then the filters wp_headers or send_header are probably applied to early. We could instead use the template_redirect hook to target the front-page, … Read more

Redirect www to non-www htaccess

This is what you want: RewriteEngine On RewriteCond %{HTTP_HOST} website\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://website.com/$1 [R,L] @elgoots, the reason yours was close but still had trouble is your HTTP_HOST has the www in it.

wp_remote_get() not retrieving pages properly

The HTTP request sent by wp_remote_get() is different from the one that a browser sends. E.g the user-agent is different (see documentation). Some websites respond differently based on this. The second argument of wp_remote_get() allows one to alter the request. Websites might also respond differently depending on the IP or the number of requests received … Read more

Upgrade to SSL Breaks Admin Dashboard

Not sure what plugin you are using to enforce SSL, but I would disable it to prevent conflicts with the possible solution below. To make sure you’ve updated all of your URLs to the HTTPS, do the following: Go and download Interconnect IT’s Database Search & Replace Script here Unzip the file and drop the … Read more

force http canonical tag on https pages

You can change it using following code, add it in your theme function.php or in plugin. remove_action ( ‘wp_head’ , ‘rel_canonical’ ) ; add_action ( ‘wp_head’ , ‘my_rel_canonical’ ) ; function my_rel_canonical () { ob_start () ; rel_canonical () ; $rel_content = ob_get_contents () ; ob_end_clean () ; echo str_replace ( “https:” , “http:” , … Read more