Basically what is says is is this a single post? If so, show the post title. Is it a category? If so, show the category name. Otherwise show the blog description.
< title > < ?php if ( is_single() ) { bloginfo('name'); echo " - "; single_post_title('', true); } elseif ( is_category() ) { bloginfo('name'); echo " - "; $category = get_the_category(); echo $category[0]->cat_name; } else { bloginfo('name'); echo " - "; bloginfo('description'); } ? > < /title > < meta name="description" content=" < ?php if ( is_single() ) { bloginfo('name'); echo " - "; single_post_title('', true); } elseif ( is_category() ) { bloginfo('name'); echo " - "; $category = get_the_category(); echo $category[0]->cat_name; } else { bloginfo('name'); echo " - "; bloginfo('description'); } ? > / >
No comments:
Post a Comment