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?
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- Set up collaborative site
- How to disable Multisite sign-up page?
- How To Provide Sub-Blogs Their Own Domain Names?
- “You need a higher level of permission” after admin changing. Why?
- Advanced Custom Fields Multisite Upload/Imagery Issue [closed]
- Tax_query not working on multisite
- Can I manage more wordpress sites with one wordpress administrator page? [closed]
- Add menu page on multisite
- htmll lang=”de” but admin page in English
- What should I do? A multisite, a single website or many websites? [closed]
- Dissolve Multisite while making site #5 the main site?
- Disabling outbound connectivity on web servers [closed]
- The wp_blogmeta table is not installed. Please run the network database upgrade
- Enable wildcard in a WordPress Multisite (Sub-Domains)
- Multi-site get_bloginfo(‘stylesheet_directory’) referring to sub-folder
- Temp URL Redirect Loop
- Create a homepage like WordPress.com?
- get post id by $content (so by post content)
- Set default settings for all new multisites?
- Show content of other domain inside WordPress
- 3 blogs on one site with the same header menu?
- How to check if page exists in Multisite?
- Create “/blog” sub-site on WP multisite network
- Share contents/posts between sites in a WordPress 5.6
- Wait ajax to complete before continue loop
- Multisite default theme and child applied to network
- Change WordPress Multisite Domain
- Remove W3 Total Cache minified files on custom page outside of WordPress [closed]
- Pros and Cons of Post Types vs. Multiple Blogs
- Restrict users of site 1 to login in site 2 in wordpress multisite
- Unable to execute Ajax request, status code 400
- A database for each category?
- Redirect a WordPress Multisite url after it has been change to a new one
- How to make the redirects right? IP to domain name folders
- Cannot access wp-admin after installing SSL – user capabilities not being set
- Multisite issue
- How to Add Super Admin for WordPress multi-site
- Can’t access 2nd site (sub) dashboard of WordPress Multisite
- what if one user in WPMU change the theme files?
- WordPress and SQL – Update and Insert from another table if column value doesn’t exist
- Network – My sites are unavailable
- Any idea on how to fix this error when forcing SSL on a certain page?
- Planning on Multisite Before Creating A Network
- Registration Page
- Can admins on network install view and edit users accounts?
- Unsure of my options, Multi-blog?
- WordPress Multisite with HTML template as Root
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- Change a subsite Admin role of a WordPress Multisite after 24 hours registering