Title: rtpdev's Replies | WordPress.org

---

# rtpdev

  [  ](https://wordpress.org/support/users/rtpdev/)

 *   [Profile](https://wordpress.org/support/users/rtpdev/)
 *   [Topics Started](https://wordpress.org/support/users/rtpdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/rtpdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/rtpdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/rtpdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/rtpdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/rtpdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Defer parsing of javascript](https://wordpress.org/support/topic/defer-parsing-of-javascript-4/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/defer-parsing-of-javascript-4/#post-4258847)
 * Hi detters, any luck yet?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Activity Log - Monitor & Record User Changes] Feature suggest: better multisite support](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/#post-3961028)
 * Try this [http://wordpress.org/plugins/wp-security-audit-log/](http://wordpress.org/plugins/wp-security-audit-log/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)] Status: Tracking Not Installed](https://wordpress.org/support/topic/status-tracking-not-installed-3/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/status-tracking-not-installed-3/#post-4757576)
 * Nice point, thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)] Status: Tracking Not Installed](https://wordpress.org/support/topic/status-tracking-not-installed-3/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/status-tracking-not-installed-3/#post-4757574)
 * Well as long as your getting getting data now you shouldn’t be worried I guess.
   I just know that if you download Chrome extension GA Debugger mentioned above
   it will show you any errors. Mine kicked in now too. Its just a waiting game.
   The best way to test is to go to analytics.google.com and view “Real-time stats”
   on site. Even if it says “tracking not installed” it will still report real-time
   stats if things are setup correctly.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)] Status: Tracking Not Installed](https://wordpress.org/support/topic/status-tracking-not-installed-3/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/status-tracking-not-installed-3/#post-4757572)
 * Bizds, when I use [https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en](https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en)
   on your site it looks like you have duplicate analytics code. This might be affecting
   your performance?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)] Status: Tracking Not Installed](https://wordpress.org/support/topic/status-tracking-not-installed-3/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/status-tracking-not-installed-3/#post-4757571)
 * I am experiencing a similar situation at madisoncountryclub.com. Im using GA 
   Chrome Debugger extension and everything looks good but tracking code is undetected
   in GA Admin.
 * Any clue here? Thanks for your time!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Activity Log - Monitor & Record User Changes] Feature suggest: better multisite support](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/#post-3961026)
 * Ok, I feel that is a good plan because then you could use the exact same model,
   but truth be told I found a suitable alternative. Thank you for your response.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Admin Menu Editor] Special Character Added](https://wordpress.org/support/topic/special-character-added/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/special-character-added/#post-4658171)
 * Hey guys. This is a really easy fix. Raven, just add this to functions.php or
   a custom plugin:
 *     ```
       add_action( 'admin_head', 'hideThoseBuggers' );
       function hideThoseBuggers() {
           echo "<style type='text/css'>.dashicons br { display:none; }</style>";
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Activity Log - Monitor & Record User Changes] Feature suggest: better multisite support](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/#post-3961024)
 * I’m really liking this, but switching between 30+ sites in my network is tedious
   work. I need to aggregate the results. I see what you mean about how you create
   a table for each site, such as “wp_10_aryo_activity_log”.
 * Now that I have the plugin installed, at least the logging is taking place. I
   plan to eventually write my own plugin that looks at the wp_[all site]_aryo_activity_log
   tables and spits out the info in the network admin dashboard.
 * Any reason you haven’t done this yet? Are there any obstacles you think I might
   run into?
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Activity Log - Monitor & Record User Changes] Feature suggest: better multisite support](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/)
 *  [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/feature-suggest-better-multisite-support/#post-3961023)
 * Hi Yakir. This plugin looks really great. Have you had any luck accommodating
   this request?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress MU Domain Mapping] Disable primary domain check per page](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/)
 *  Thread Starter [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/#post-4751981)
 * This works nice
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress MU Domain Mapping] Disable primary domain check per page](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/)
 *  Thread Starter [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/#post-4751978)
 * Hooray. I’m getting close. I was able to find a way to grab the mapped domain
   by modifying the code here ([https://blog.ed.gs/2012/12/18/get-wordpress-domain-mapped-url/](https://blog.ed.gs/2012/12/18/get-wordpress-domain-mapped-url/))
   to the following:
 *     ```
       function get_domain_mapped_url( $custom_blog_id ) {
               // Enable WordPress DB connection
               global $wpdb;
   
               // To reduce the number of database queries, save the results the first time we encounter each blog ID.
               static $return_url = array();
   
               $wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
   
               if ( !isset( $return_url[ $custom_blog_id ] ) ) {
                       $s = $wpdb->suppress_errors();
   
                       if ( get_site_option( 'dm_no_primary_domain' ) == 1 ) {
                               // get primary domain, if we don't have one then return original url.
                               $domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '{$custom_blog_id}' AND active = 1 LIMIT 1" );
                               if ( null == $domain ) {
                                       $return_url[ $wpdb->blogid ] = untrailingslashit( get_site_url( $custom_blog_id ) );
                                       return $return_url[ $custom_blog_id ];
                               }
                       }
   
                       $wpdb->suppress_errors( $s );
   
                       $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
                       if ( $domain ) {
                               $return_url[ $custom_blog_id ] = untrailingslashit( $protocol . $domain  );
                               $setting = $return_url[ $custom_blog_id ];
                       } else {
                               $return_url[ $custom_blog_id ] = false;
                       }
               } elseif ( $return_url[ $custom_blog_id ] !== FALSE) {
                       $setting = $return_url[ $custom_blog_id ];
               }
   
               return $setting;
       }
   
       $stid = get_current_blog_id();
       $pri_dom = get_domain_mapped_url( $stid );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress MU Domain Mapping] Disable primary domain check per page](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/)
 *  Thread Starter [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/#post-4751977)
 * 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!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress MU Domain Mapping] Disable primary domain check per page](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/)
 *  Thread Starter [rtpdev](https://wordpress.org/support/users/rtpdev/)
 * (@rtpdev)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/disable-primary-domain-check-per-page/#post-4751976)
 * Hi Ron, I really appreciate your reply and sorry I’ve taken so long to get back
   to you. I am still trying to resolve this issue. At the moment I’m more or less
   circumventing it.
 * **Preferred Solution:**
    In short, I need to “Disable primary domain check.” 
   only for specific pages that I want to serve on the secure sub-domain OR enable
   primary domain check only for all HTTP (non-HTTPS) requests.
 * **Current “not-so-great” Solution:**
    Hopefully my live example will help clarify
   the issue. For the moment, I have “Disable primary domain check.” set to true.
   This allows us to access both [http://golfglengarry.com](http://golfglengarry.com)
   AND [https://glengarry.rtphq.com](https://glengarry.rtphq.com). I then use the
   plugin “WordPress HTTPS (SSL)” to do a few things:
    1. Force SSL on all admin pages
    2. Force any pages tagged as secure on golfglengarry.com to glengarry.rtphq.com
    3. Force a hard-coded list of shopping cart pages to be tagged as secure (as you
       can see if go to [http://golfglengarry.com/catalogue/](http://golfglengarry.com/catalogue/)
       it will auto-redirect you to [https://glengarry.rtphq.com/catalogue/](https://glengarry.rtphq.com/catalogue/))
    4. Forces unsecure pages to use HTTP, **but the page remains on the subdomain**
       instead of forcing back to Primary domain.
 * **In Summary:**
    At this point I can add canonical urls to each page that point
   at the Primary domain to help prevent any duplicate content issues, but then 
   I still have the problem with our users visiting the site, checking out the online
   store, then returning to a non-secure page served on the sub-domain. It would
   be really nice if we could get there users looking at the Primary domain whenever
   possible.
 * Let me know what you think! Thank you for your time!

Viewing 14 replies - 1 through 14 (of 14 total)