ID, "keywords", true); if($keywords == ""){ $tags = wp_get_post_tags($post->ID); foreach ($tags as $tag){ $keywords = $keywords.$tag->name.","; } $keywords = rtrim($keywords, ', '); } $description = get_post_meta($post->ID, "description", true); if($description == ""){ if($post->post_excerpt){ $description = $post->post_excerpt; }else{ $description = mb_strimwidth(strip_tags($post->post_content),0,200,''); } } }elseif (is_page()){ $keywords = get_post_meta($post->ID, "keywords", true); $description = get_post_meta($post->ID, "description", true); }elseif (is_category()){ $keywords = single_cat_title('', false); $description = category_description(); }elseif (is_tag()){ $keywords = single_tag_title('', false); $description = tag_description(); } $keywords = trim(strip_tags($keywords)); $description = trim(strip_tags($description)); ?> /style.css" /> '; }else{ echo ''; } ?>