Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Created August 14, 2017 13:23
Show Gist options
  • Save andrasguseo/91c8d1cd280cad4e10d1b3ec39bd94d5 to your computer and use it in GitHub Desktop.
Save andrasguseo/91c8d1cd280cad4e10d1b3ec39bd94d5 to your computer and use it in GitHub Desktop.
Title for Maddie
<?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