From: Chuck Scott Date: Fri, 8 Jul 2016 18:51:28 +0000 (-0400) Subject: Beat Yoast SEO once again. This time with page titles. X-Git-Tag: v1.1.8^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4e837609fb7782acab6695b2a0a3afaa3bc0935c;p=WP-Plugins%2Fglm-member-db-packaging.git Beat Yoast SEO once again. This time with page titles. --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 8136de0..da0292a 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -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