First, most sites are moving to exclusively https, so Wordpress concentrates on that.
Secondly, the method will be different depending on if you are on a Wordpress.com site or using Wordpress on another hosting platform or if you built the site yourself with Wordpress.org.
Now, if you are on Wordpress.com, then I would suggest contacting their support staff. There are odd limitations when using that platform that do not always apply with other Wordpress websites. They may have plugins, I do not know.
If you used Wordpress.org, you can look for plugins or try adding both http & https to your wp-config.php file. Here's an example from blog.rabin.io:
function isSecure() {
return
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| $_SERVER['SERVER_PORT'] == 443;
}
$web_site = 'blog.rabin.io';
$schema = isSecure() ? 'https://' : 'http://';
$web_site_url = $schema . $web_site;
define('WP_HOME', $web_site_url);
define('WP_SITEURL', $web_site_url);
(No, I have not tested this.)
Then if you wanted to you would have to force SSL for the page(s) you want with this (example for login & admin):
define( 'FORCE_SSL_LOGIN', true );
define( 'FORCE_SSL_ADMIN', true );
For a Wordpress site on another hosting platform, I suspect there are plugins for that. Depending on the hoster, you may be able to modify your wp-config yourself.
/
, or protocol relative//example.com/
. This StackOverflow thread says that it appears to work Relative URLs in Wordpress. Some answers have plugin suggestions as well.WP_HOME
andWP_SITEURL
to relative links.