Instead of get_option
, use home_url
which will determine …
the appropriate protocol, “https” if
is_ssl()
and “http” otherwise. If
the$scheme
argument is “http” or “https” theis_ssl()
check is
overridden.
In fact, network_home_url
would be more appropriate since you are talking about Multisite.
Those should return the same value that you are trying the access in your code– the home
option key– but with the appropriate protocol.
This may not be the URL you want though. You may want site_url
or the multisite equivalent, network_site_url
.
Related Posts:
- Switching MultiSite installation from HTTP to HTTPS
- How to use WordPress multisite with mixed HTTP and HTTPS sites?
- Add New Sub Site from the WordPress back end then in sub site options table option_value must be with https
- Make default new sites https (multisite)
- wp-admin redirect loop with ssl
- How to properly force https and www on multisite with Apache HTAccess
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- Domain Mapping for WordPress MU and https redirection – How to?
- How to convert multisite subdomain from http to https
- WordPress Multisite keeps redirecting to HTTPS
- Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?
- What do I need to do to convert my MultiSite from HTTP to HTTPS?
- Multisite Domain Mapping with SSL
- SSL wildcard issue for wp multisite subdomains
- Multisite database upgrade SSL error
- “Upgrade Network” error: stuck with SSL certificate verification
- SSL for mapped subdomains in multisite (no plugins)
- Why wordpress multisite redirect to wp-signup if site exists?
- Multisite without .htaccess
- Is Partial SSL Possible? ( multisite )
- wordpress multisite, https for whole site or just admin?
- Forcing SSL Protocol for Multisite Subdomain Child Sites + cPanel Configuration
- https redirect hell (adding www)
- Force Load https WordPress Plugins
- Site kit Google Analytics setup giving Error: {“error”:”invalid ‘redirect_uri'”}
- Link to Network Admin Broken After Switching to HTTPS
- How to use a Wildcard SSL with WordPress Network?
- Is this the right set of records for Route53 domain to point to a mapped domain in a multisite? [closed]
- Nginx Wildcard SSL with WordPress Multisite Subdomains
- Migrating MultiSite to SSL: Media Library not updating
- Multisite, domain mapping and SSL?
- MU/Subdomains + Domain Mapping + SSL?
- HTTPS Warning and Certificate Error when Updating Network
- Issue with Multisite and SSL
- Network Admin URL is shown to anyone before accessing a blog
- Media library links broken WordPress Multisite after SSL update
- Redirecting specific sites to HTTP in WordPress Multisite
- Enable HTTPS for AWS hosted multisite domain (with AWS purchased SSL) on already created Load Balancer?
- WordPress Multisite with Wildcard Certificates not mapping correctly
- SSL for Mapped Domains with WordPress Multisite on AWS
- Multisite domain mapping with SSL redirects to main domain
- Update siteurl and home in multisite subsites to https
- User not staying logged into one of sub sites in multisite after SSL
- Single sign on to sub-sites in Multisite Network
- WordPress Multisite with cPanel Addon Domains and SSL
- WordPress Network with SSL for multiple domains
- Sending SMTP mail using a server with self-signed SSL
- Nice font not working when http to https – SSL Issue
- Integrating WordPress for blog and other content pages in a web app
- Using WordPress multisite is there a way to force HTTPS on specific subsites and not others?
- SSL Error: unable to get local issuer certificate
- https connection using CURL from command line
- Curl command for https ( SSL )
- nodejs – error self signed certificate in certificate chain
- Simple Java HTTPS server
- HTTPS connection Python
- Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- How do you redirect HTTPS to HTTP?
- Could not establish secure channel for SSL/TLS with authority ‘*’
- Python requests SSL error – certificate verify failed
- How can I force users to access my page over HTTPS instead of HTTP?
- How to force Laravel Project to use HTTPS for all routes?
- How can I fix the “No certificates found – The app Chrome has requested a certificate” Android / Google Chrome issue
- Issues with installing python libraries on Windows : CondaHTTPError: HTTP 000 CONNECTION FAILED for url
- How to use WordPress Multisite With Different Domain Names?
- How To Add Custom Form Fields To The User Profile Page?
- Where are available Roles Defined in the wp_ database?
- restore_current_blog() vs switch_to_blog()
- Can i merge 2 new WP_Query($variable) ‘s?
- How to disable a network enabled plugin for just one site?
- How to reliably flush rewrite rules on multisite?
- SSL Breaks WordPress CSS
- Site Redirecting to wp-signup.php
- Moving a WP Multisite to a subdirectory
- Cookies in multisite where network sites have their own domain name
- Setting $_SERVER[‘HTTPS’]=’on’ prevents access to wp-admin
- Convert a Multisite WordPress install into a Single site
- WordPress MultiSite Active Directory integration and site privacy
- WordPress Job Interview Preparation
- How to add Custom Blog Options to new blog setup form?
- How can I trust switch_to_blog()?
- Remove the blog slug from WordPress Multisite root node
- Why are my roles not visible in a Multi-site/Network?
- Site admin in a network install can’t edit users?
- How to use same email for multiple users
- How to run an activation function when plugin is network activated on multisite?
- Specific upload folder for PDFs in custom Post type in WP multisite
- What is the correct way to map multiple domains in a WordPress 4.1 multisite install?
- Where can I find documentation on what characters are allowed in user names and why?
- How to migrate subsite from dev multisite to production multisite
- Disable SSL / HTTPS for wordpress
- How can I un-reserve a pending username registration?
- How do I remove/delete an old super admin user?
- DB connection error after copying a WordPress Multisite instance to a second location
- Redirect Main Site to Subsite in Multisite WordPress
- Is there a is_user_logged_in() for multisite?
- Allow user to select a theme to install when they signup
- Setting up a wordpress network with third level domains
- Get upload URL by blog ID in multisite
- What’s the difference between get_site_option and get_blog_option?