Multiple homes for multiple languages [closed]
Multiple homes for multiple languages [closed]
Multiple homes for multiple languages [closed]
query_vars in home, not loading the “home” page
Multilanguage URLs
You need to is is_front_page() instead of is_home(). is_home() actually refers to the blog page (or the home page if you have it set to show latest posts). is_front_page() refers to the page (regardless of whether it is a static page or a latest posts feed) that sits on the front of your site.
In case anyone runs into similar issues. Here is what worked, as suggested by ItsMePN. If your site is on a loadbalancer such as CloudFlare, is_ssl() doesn’t work. Neither did it work for me on a site hosted on “Cloudways + Digital Ocean” Here is the gist https://gist.github.com/webaware/4688802 for force-ssl-url-scheme.php you need to download & … Read more
Since you mention multiple environments you can manually define the site URL within your wp-config.php file define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); Keep in mind that it will override what you have set in your options table. As detailed in the documentation: Setting this value in wp-config.php overrides the … Read more
You could do this by creating a new page called “Home” with the permalink slug of “home” and another page e.g. “Landing” for your landing page. Then go to Settings -> Reading and set the “Front Page” option to your landing page from the dropdown box. You will then be able to link to mydomain.com/home … Read more
Found the answer. It is a bug in WordPress v5.2.3 affecting WordPress in Windows environments. Caused by backslashes in Windows paths that aren’t stripped correctly Details here: https://core.trac.wordpress.org/ticket/47980 I have tried the patch suggested and can confirm it solves the problem. replace: $location = “https://wordpress.stackexchange.com/” . ltrim( $path . “https://wordpress.stackexchange.com/”, “https://wordpress.stackexchange.com/” ) . $location; with … Read more
If you look at the source for the home_url() function, you’ll note a small series of function calls eventually invoking get_option(). As explained in this WPSE Answer, the get_option() function is cached, meaning that if an option’s value is already in memory, get_option() returns that value instead of querying the database again. As a result, … Read more
This question has been discussed several times on the WordPress Hackers email list, I’d recommend Googling something like wp-hackers absolute relative to get an overview of the various lively debates that have taken place over the years. Personally I use the searchreplacedb2 script whenever I migrate a database between URLs, e.g. from live to local/test/dev.