Created
August 15, 2016 08:23
-
-
Save mzo84/4a50b20382742847e82729e1790ded02 to your computer and use it in GitHub Desktop.
<title> tag for bookmark friendly links
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
<title> | |
<?php if (function_exists('is_tag') && is_tag()) { | |
single_tag_title('Tag Archive for "'); echo '" - '; | |
} elseif (is_archive()) { | |
wp_title(''); echo ' Archive - '; | |
} elseif (is_search()) { | |
echo 'Search for "'.wp_specialchars($s).'" - '; | |
} elseif (!(is_404()) && (is_single()) || (is_page())) { | |
wp_title(''); echo ' - '; | |
} elseif (is_404()) { | |
echo 'Not Found - '; | |
} | |
if (is_home()) { | |
bloginfo('name'); echo ' - '; bloginfo('description'); | |
} else { | |
bloginfo('name'); | |
} | |
if ($paged > 1) { | |
echo ' - page '. $paged; | |
} ?> | |
</title> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment