From 4e837609fb7782acab6695b2a0a3afaa3bc0935c Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 8 Jul 2016 14:51:28 -0400 Subject: [PATCH] Beat Yoast SEO once again. This time with page titles. --- setup/frontHooks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.17.1