Adding link to a Yoast SEO filter to stop it from creating incorrect canonical page...
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 7 Jul 2016 19:03:19 +0000 (15:03 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 7 Jul 2016 19:03:19 +0000 (15:03 -0400)
index.php
setup/frontHooks.php

index 06c533a..375e669 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 2.1.24
+ * Version: 2.1.25
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -38,7 +38,7 @@
  *
  */
 
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.24');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.25');
 define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.11');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
index 30ad731..45e9b09 100644 (file)
@@ -104,6 +104,14 @@ add_action('init', function() {
     return;
 });     // do_action 'init'
 
+/*
+ *  Kill Yoast SEO canonical page links in headers. They override the correct canonical links farther down in the header.
+ *  Yoast does not have an option for this like some other SEO plugins do.
+ */
+add_filter( 'wpseo_canonical', function($canonical) {
+    return false;
+});
+
 /* End of rel_canonical code */