Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Created May 17, 2018 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonysbrown/e372d97bf15184b8c58f52eeefdc20e9 to your computer and use it in GitHub Desktop.
Save anthonysbrown/e372d97bf15184b8c58f52eeefdc20e9 to your computer and use it in GitHub Desktop.
Add Yoast SEO support for Optima Express
<?php
add_action('wpseo_title','optima_wpseo');
function optima_wpseo($title ){
global $post;
if ($post->ID == 0 && $post->post_author == 0 && $post->post_type == 'page') {
$title = $post->post_title.' | '.get_bloginfo( 'name' ).'';
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment