Last active
August 29, 2015 14:11
-
-
Save mannieschumpert/6adbae86c4e82f461533 to your computer and use it in GitHub Desktop.
WP SEO: Modify SEO Title for Custom Post Type
This file contains 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
add_filter( 'wpseo_replacements', 'mannie_filter_seo_replacements' ); | |
function mannie_filter_seo_replacements( $replacements ){ | |
global $post; | |
if ( isset( $replacements['%%title%%'] ) && $post->post_type === 'project' ) | |
$replacements['%%title%%'] = 'Project: ' . $replacements['%%title%%']; | |
return $replacements; | |
} |
This file contains 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
array = ( | |
['%%title%%'] => 'Your Post Title', | |
['%%sep%%'] => '-', | |
['%%sitename%%'] => 'Your Site Name' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment