';
}
if (is_single() || is_page()){
$excerpt = get_the_excerpt();
$title = get_the_title();
if ($excerpt == '')
echo '';
else
echo '';
}
}
// Located in header.php
// Creates the content of the Title tag
// Credits: Tarski Theme
function wplook_doctitle() {
if ( is_search() ) {
$content = __('Search Results for:', 'wplook');
$content .= ' ' . esc_html(stripslashes(get_search_query()));
}
elseif ( is_category() ) {
$content = __('Category Archives:', 'wplook');
$content .= ' ' . single_cat_title("", false);
}
elseif ( is_day() ) {
$content = __( 'Daily Archives:', 'wplook');
$content .= ' ' . esc_html(stripslashes( get_the_date()));
}
elseif ( is_month() ) {
$content = __( 'Monthly Archives:', 'wplook');
$content .= ' ' . esc_html(stripslashes( get_the_date( 'F Y' )));
}
elseif ( is_year() ) {
$content = __( 'Yearly Archives:', 'wplook');
$content .= ' ' . esc_html(stripslashes( get_the_date( 'Y' ) ));
}
elseif ( is_tag() ) {
$content = __('Tag Archives:', 'wplook');
$content .= ' ' . single_tag_title( '', false );
}
elseif ( is_404() ) {
$content = __('Not Found', 'wplook');
}
else {
$content = '';
}
$elements = array("content" => $content);
// Filters should return an array
$elements = apply_filters('wplook_doctitle', $elements);
// But if they don't, it won't try to implode
if(is_array($elements)) {
$doctitle = implode(' ', $elements);
}
else {
$doctitle = $elements;
}
if ( is_search() || is_category() || is_day() || is_month() || is_year() || is_404() || is_tag() ) {
$doctitle = "";
}
echo $doctitle;
}
?>