Created
August 14, 2017 13:23
-
-
Save andrasguseo/91c8d1cd280cad4e10d1b3ec39bd94d5 to your computer and use it in GitHub Desktop.
Title for Maddie
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
<?php ?> | |
<title> | |
<?php | |
global $page, $paged; | |
wp_title('|', true, 'right'); | |
$site_description = get_bloginfo('description', 'display'); | |
// If it's home of front page... | |
if ($site_description && ( is_home() || is_front_page() )) { | |
bloginfo('name'); | |
echo " | $site_description"; | |
} | |
// If it is a page with calendar events... | |
// Uncomment the one you need. | |
elseif ( tribe_is_event_query() ) { | |
// echo " | $site_description"; // shows the site description | |
echo " | " . get_bloginfo('name'); // shows the site title | |
} | |
// otherwise... | |
else { | |
bloginfo('name'); | |
} | |
if ($paged >= 2 || $page >= 2) | |
echo ' | ' . sprintf(__('Page %s', 'tkingdom'), max($paged, $page)); | |
?> | |
</title> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment