Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removing title tag and adding fall back code incase the child theme d…
…oesn't have title-tag support
  • Loading branch information
jmr06005 committed Feb 15, 2018
1 parent 80278e3 commit fa6ca78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions functions.php
Expand Up @@ -296,4 +296,14 @@ function uc_redirect_403() {
}

add_action( 'template_redirect', 'uc_redirect_403' );

//Add titme tag if theme doesn't have title-tag theme support
if ( ! function_exists( '_wp_render_title_tag' ) ) {
function theme_slug_render_title() {
?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php
}
add_action( 'wp_head', 'theme_slug_render_title' );
}
?>
1 change: 0 additions & 1 deletion header.php
Expand Up @@ -28,7 +28,6 @@ if ( apply_filters( 'load_custom_header', false ) ) {
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
Expand Down

0 comments on commit fa6ca78

Please sign in to comment.