Skip to content

Instantly share code, notes, and snippets.

@AramZS
Created April 24, 2014 17:37
Show Gist options
  • Select an option

  • Save AramZS/11262971 to your computer and use it in GitHub Desktop.

Select an option

Save AramZS/11262971 to your computer and use it in GitHub Desktop.
Get Co-Authors-Plus to talk with Yoast's WP-SEO
<?php
function wp_co_author_title($title){
if (is_author()){
$aTitle = get_the_author();
if (empty($aTitle)){
if (function_exists('get_coauthors')){
$qo = get_queried_object();
$bTitle = $qo->display_name;
return $bTitle . $title;
}
}
return $title;
}
return $title;
}
add_filter('wpseo_title', 'wp_co_author_title');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment