Quantcast
Channel: WordPress.org Forums » [WordPress MU Domain Mapping] Support
Viewing all articles
Browse latest Browse all 3502

rtpdev on "[Plugin: WordPress MU Domain Mapping] Disable primary domain check per page"

$
0
0

Hi again. I've been at this all night and I think I might have a way to tighten up my current solution...

The goal is to prevent duplicate content and maximize the use of the mapped domain.

1. Anywhere on network - if HTTPS, add noindex/nofollow. To accomplish this I added to functions.php: if ($_SERVER['HTTPS'] = "on") { echo '<meta name="robots" content="noindex,nofollow,noodp,noydir">'; }

2. Replace all hrefs with Primary domain host
3. Ensure all cononical links reference Primary domain

I know a few ways that I can implement 2 and 3 but I can't figure out how to find the mapped primary domain from with functions.php or my own plugin/extension. I can't seem to track down a built-in function to accomplish this. Is there one? Or must I manually query the db?

Something like this, echo get_option( 'siteurl' ); that returns the mapped url instead of original.

Thanks!


Viewing all articles
Browse latest Browse all 3502

Trending Articles