Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #157 from jmr06005/master
Removing title tag and adding fall back code incase the child theme doesn't have title-tag support
  • Loading branch information
jmr06005 committed Feb 15, 2018
2 parents 80278e3 + a847450 commit d29afdf
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 title 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 d29afdf

Please sign in to comment.