https images not displaying

Place this code in your functions.php. It will filter all of the content before serving on application layer. <?php function filterContent($content) { $upateURL = array ( ‘http://www.example.com/wp-content/uploads’ => ‘https://www.example.com/wp-content/uploads’, ); foreach ($upateURL as $key => $value) { $content = str_replace($key, $value, $content); } return $content; } add_filter(‘the_content’, ‘filterContent’); ?>

Modify wp headers on specific page

from How can I change HTTP headers only to posts of a specific category from a plugin: add_action( ‘template_redirect’, ‘update_header_cache’ ); function update_header_cache() { if( is_single( 1234) ) { header(‘Cache-Control: no-store, no-cache, must-revalidate, max-age=0’); header(‘Pragma: no-cache’); header(‘Expires: Thu, 01 Dec 1990 16:00:00 GMT’); } }

Using the JSON API via HTTPS and HTTP

You can serve your site on both protocols http and https. This might be problem if you care about SEO (duplicate content). You can use 301 redirection to force users to be redirected from http to https. Old app will be slightly slower because of redirection but it will be working. This might be problem … Read more

Redirect HTTP request to HTTPS request

Although the answer in the comment to your question will work (here it is formatted), there are some variations that might be needed depending on your hosting environment, so contact your hosting support for specifics. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Enable CORS for getting an inline SVG by URL

By using custom rewrite_url, I was able to hijack the request and set its CORS-friendly headers. class Cors_Media { const QUERY_VAR = ‘cors_media_id’; public function init() { add_action(‘init’, [$this, ‘add_rewrite_rule’]); add_filter(‘query_vars’, [$this, ‘query_vars’]); add_action(‘template_redirect’, [$this, ‘template_redirect’]); } public function query_vars(array $qs) { $qs[] = ‘cors_media_id’; return $qs; } public function add_rewrite_rule() { add_rewrite_rule( ‘^cors_media_id/([0-9]+)/?’, ‘index.php?cors_media_id=$matches[1]’, … Read more