How To Add Meta Descriptions To Your Posts in WordPress Using Coding ?
WordPress does not use meta description tags by default in POSTS.To create meta description tags for individual posts in your wordpress website use the following Code.
Ans:-Open your header.php file in
<meta name="description" content="
<?php if ( (is_home()) || (is_front_page()) ) {
echo ('Your main description goes here');
} elseif(is_category()) {
echo category_description();
} elseif(is_tag()) {
echo '-tag archive page for this blog' . single_tag_title();
} elseif(is_month()) {
echo 'archive page for this blog' . the_time('F, Y');
} else {
echo get_post_meta($post->ID, "Metadescription", true);
}?>">
Note:-
For category pages, tag pages, archives
Total Page Visits: 3687 - Today Page Visits: 3