Created
June 18, 2014 18:42
-
-
Save anneallen/02478c7ed25df4a69374 to your computer and use it in GitHub Desktop.
Remove Yoast Wordpress SEO Title tag filter (genesis framework)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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