rtpdev
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Defer parsing of javascriptHi detters, any luck yet?
Nice point, thanks!
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.
Bizds, when I use 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?
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!
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
In reply to: [Admin Menu Editor] Special Character AddedHey 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>"; }
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!
Hi Yakir. This plugin looks really great. Have you had any luck accommodating this request?
Forum: Plugins
In reply to: [WordPress MU Domain Mapping] Disable primary domain check per pageThis works nice
Forum: Plugins
In reply to: [WordPress MU Domain Mapping] Disable primary domain check per pageHooray. 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/) 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://" : "https://"; 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
In reply to: [WordPress MU Domain Mapping] Disable primary domain check per pageHi 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 domainI 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
In reply to: [WordPress MU Domain Mapping] Disable primary domain check per pageHi 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 https://golfglengarry.com AND https://glengarry.rtphq.com. I then use the plugin “WordPress HTTPS (SSL)” to do a few things:- Force SSL on all admin pages
- Force any pages tagged as secure on golfglengarry.com to glengarry.rtphq.com
- Force a hard-coded list of shopping cart pages to be tagged as secure (as you can see if go to https://golfglengarry.com/catalogue/ it will auto-redirect you to https://glengarry.rtphq.com/catalogue/)
- 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!