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

Removing title tag and adding fall back code incase the child theme doesn't have title-tag support #157

Merged
merged 2 commits into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<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