Best Way To Add Meta Description For SEO

Add Tool

Best Way To Add Meta Description For SEO Without Plugin


Best Way To Add Meta Description For SEO Without Plugin

Hello learners, How are You? If you want to avoid plugin to add meta descriptions of your WordPress site, You are in right place. In this web developers resources we will Try to inform you "How to add Meta Description For SEO Without Plugin" We don’t need no stinkin’ plugin for custom meta descriptions. All you need a custom field named “metadescription” with the desired meta description for each post. Once you have that going, include the following function to your theme’s header.php file (within the <head> section:

<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);
} ?>" />


This function enables you to customize the descriptions for various types of pages, such as the home page, category pages, tag archives, and so on. For single post-view pages, this function will display the value of the metadescription custom field.


Tags: meta description, how to write meta description, meta description length, meta description example, what is a meta description, meta description tag
Payza

About Masum Billah

Best Way To Add Meta Description For SEO Without Plugin 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools


SIGN UP TO GET UPDATE TO YOUR INBOX




Discuss about: Best Way To Add Meta Description For SEO


adf.ly