Skip to content

Instantly share code, notes, and snippets.

@anneallen
Created June 18, 2014 18:42
Show Gist options
  • Select an option

  • Save anneallen/02478c7ed25df4a69374 to your computer and use it in GitHub Desktop.

Select an option

Save anneallen/02478c7ed25df4a69374 to your computer and use it in GitHub Desktop.
Remove Yoast Wordpress SEO Title tag filter (genesis framework)
//Change Title tag from yoast
global $wpseo_front;
remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 );
//Add Custom title tag
add_filter( 'wp_title', 'child_loops_title', 10, 3 );
function child_loops_title( $title, $sep, $seplocation ) {
$test = ucfirst((get_query_var('state')));
$brand_aa = ucfirst((get_query_var('brands')));
$sep = genesis_get_seo_option( 'doctitle_sep' ) ? genesis_get_seo_option( 'doctitle_sep' ) : '–';
$seplocation = genesis_get_seo_option( 'doctitle_seplocation' ) ? genesis_get_seo_option( 'doctitle_seplocation' ) : 'right';
$title = $brand_aa.' Store '.$test.' - Store Locations & Online Information';
return esc_html( trim( $title ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment