generated from pascalmartineau/wp-skeleton
fix: headless home-url
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m2s
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m2s
This commit is contained in:
10
wp-content/mu-plugins/headless-home-url.php
Normal file
10
wp-content/mu-plugins/headless-home-url.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Map WordPress home URL to the public frontend domain
|
||||
add_filter( 'home_url', 'ccat_headless_home_url' );
|
||||
function ccat_headless_home_url( $url ) {
|
||||
if ( is_admin() || wp_doing_cron() || defined( 'WP_CLI' ) ) {
|
||||
return $url;
|
||||
}
|
||||
return str_replace( 'wp.cultureat.ca', 'cultureat.ca', $url );
|
||||
}
|
||||
Reference in New Issue
Block a user