G’day mfahmi182,
My plugin doesn’t do anything per-page. However:
Whatever you’re using to add that URL is dropping the https:, not this plugin. You will need to fix that at the source — whatever is adding that URL.
FWIW, removing the protocol isn’t required for scripts and stylesheets that are available on https, because the scripts will load just fine from https on an http page. It’s better to just use the https: protocol and let the browser cache the resource, no matter whether its called from an http or https page.
cheers,
Ross
Thread Starter
fahmi
(@mfahmi182)
Thanks webaware,
here’s default AMP plugin,
<html amp>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Merriweather:400,400italic,700,700italic|Open+Sans:400,700,400italic,700italic">
<?php do_action( 'amp_post_template_head', $this ); ?>
<style>body {opacity: 0}</style><noscript><style>body {opacity: 1}</style></noscript>
<?php $this->load_parts( array( 'style' ) ); ?>
<script>
i mean, i want to full display with protocols https, not “//”
You’ll need to speak to the AMP Plugin authors, because the bit removing https: is within the plugin.
cheers,
Ross
Thread Starter
fahmi
(@mfahmi182)
i mean, there is a way to except certain page/post to display full https? on script and style
Thanks friend 🙂
My plugin doesn’t do that. All that my plugin does is change ‘http:’ to ‘https:’ where it safely can, on all pages loaded on HTTPS. It doesn’t remove ‘http:’, and it doesn’t add back ‘https:’ where the URL only starts with ‘//’
You could write a little custom code that does that, if you need it. Better would be to fix the problem at the source, e.g. the plugins you run.
cheers,
Ross