Different Subdomain changes page content

Just check the current host: add_filter( ‘the_content’, ‘domain_dependent_content’ ); function domain_dependent_content( $content ) { // get_the_ID() will return the current post ID if you need // more information about the current page. if ( ‘page’ !== get_post_type() ) return $content; if ( ‘au.example.com’ === $_SERVER[‘HTTP_HOST’] ) return “G’Day buddy!<br>$content”; if ( ‘uk.example.com’ === $_SERVER[‘HTTP_HOST’] ) … Read more

wp_get_attachment_image_src on multisite

wp_get_attachment_image_src() function returns an array that’s why your code isn’t working. Try the following code. <a href=”https://wordpress.stackexchange.com/questions/295180/<?php echo esc_url( home_url(“https://wordpress.stackexchange.com/” ) ); ?>” rel=”home”> <?php if ( get_theme_mod( ‘bwpy_logo2’ ) ) : $img_data = wp_get_attachment_image_src( absint( get_theme_mod( ‘bwpy_logo2’ ) ) ); $img_url = isset( $img_data[0] ) ? $img_data[0] : ”; // Or you can try … Read more

WordPress MU subdomain vhost

Basically, it turns out you need two dedicated IP addresses, or a third vhost. IP Address You could use two IP addresses and do something like this in your apache configuration: #IP address for WP NameVirtualHost 12.34.56.78:80 #For everything else NameVirtualHost *:80 Then, make sure the VirtualHost for WordPress is declared thus: <VirtualHost 12.34.56.78:80> and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)