"; $explodemore = explode($morestring, $post->post_content); if(!empty($explodemore[1])){ // If tag exist $description = $explodemore[0]; } else if ($post->post_excerpt) { $description = $post->post_excerpt; } else { if(preg_match('/

(.*)<\/p>/iU',trim(strip_tags($post->post_content,"

")),$result)){ $post_content = $result['1']; } else { $post_content_r = explode("\n",trim(strip_tags($post->post_content))); $post_content = $post_content_r['0']; } $description = mb_substr($post_content, 0, 220); } $keywords = ""; $tags = wp_get_post_tags($post->ID); foreach ($tags as $tag ) { $keywords = $keywords . $tag->name . ", "; } } ?>