Beat Yoast SEO once again. This time with page titles.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 8 Jul 2016 18:51:28 +0000 (14:51 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 8 Jul 2016 18:51:28 +0000 (14:51 -0400)
setup/frontHooks.php

index 8136de0..da0292a 100644 (file)
@@ -78,10 +78,10 @@ if (strpos(GLM_MEMBERS_PLUGIN_CURRENT_URL, $this->config['settings']['canonical_
     global $wpdb;
     $GLOBALS['glmPackageName'] = $wpdb->get_var( "SELECT title FROM ".GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX . "packages WHERE package_slug = '".$GLOBALS['glmDetailSlug']."'" );
 
-    // Set the page title to the event name
-    add_filter('wp_title', function() {
+    // Set the page title to the event name - Using low priority so it's the last to set the title!
+    add_filter('wp_title', function($title) {
         return $GLOBALS['glmPackageName'];
-    });
+    }, 99, 1);
 }
 
 // Add package slug query var