wp: header title
<!-- Title Credit: http://perishablepress.com/how-to-generate-perfect-wordpress-title-tags-without-a-plugin/ --> | |
<title> | |
<?php if (function_exists('is_tag') && is_tag()) { | |
echo 'Tag Archive for "'.$tag.'" — '; | |
} | |
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'); } ?> | |
</title> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment