Adding meta tag without plugin

Since i told you earlier that meta description and keyword tags are absent presently as i dont use plugins or php so I want meta description and keyword tags to follow seo rules

I’m sorry but above reply is what i can understand

Ah, thanks.

I don’t know what “SEO rules” you’re talking about. AFAIK the meta keyword tag is never used anymore and the meta description tag may be used in some situations

Anyway, the Codex documentation has all the necessary information and the steps involved.


But If you have functions.php code to do avoid manual job let me know
i need automatic way to put meta title meta description and keyword tags.

You don’t need to mess with the functions.php file.

As explained in the Codex page I linked to, you want the headers.php file.

The Codex page has example code for the headers.php file.

I already used dis

<meta name="description" content="<?php if ( is_single() ) {
        single_post_title('', true); 
    } else {
        bloginfo('name'); echo " - "; bloginfo('description');
    ?>" />

but output description gives title instead of description

This is true, using the keywords meta tag is a waste of time.

The meta description can appear in SERPs, so can be a factor in CTR. But I believe that the OP may also require it in relation to the problem in this topic.


As @SamA74 says, none of the major search engines uses the keywords meta tag, so adding that is just a waste of time.

The description meta tag is important - so much so that Google provides advice on writing good content for it:


Webmaster tools also list ‘description’ in html improvements if you’ve duplicated them or too long or short etc so at least for now they must be included in their algorithm. To what extent we don’t know though.

They are not necessarily a signal the in ranking algorithm. But may be used by Google to populate the “snippets” seen in SERPs. The idea is for them to be appealing to humans, so they may choose to click on your page in the SERP rather than another page.

1 Like

true. But i think we can agree Google do at least still recommend they are included. Unlike Keywords. Personally i still include keywords as i figure it can’t hurt provided they are relevant to the content and i don’t know for sure if other search engines still use them, but i wouldn’t be overly concerned if i didn’t.

No doubt that Google recommends the use of descriptions and they should be included.

It’s well known that meta keywords have been ignored for a very long time, you can imagine how much it must have been abused by “SEOs” in the early days, huge scope for misrepresenting the actual content.
I would not waste keystrokes or a line of code on that. Just as Google spiders won’t waste their time on them either.

1 Like

depends who you believe i guess. This article (admittedly over a year old) suggests that although it is a very very minor factor they are still used for some search engines (not google). The important bit seems to be to me that it is better not to have them if you are going to try and abuse them but on the off chance they work no harm in trying them if you put decent relevant keywords in. It’s certainly not harming my SERPs for my site at the moment. But without actually knowing for sure what is in the algorithm for every search engine we can only guess as to whether it is completely ignored or mostly ignored. For now i’ll still use them but i don’t necessarily advise others do.

We seem to be getting off-topic here. The main question is, how does the OP add meta description (and keywords if he decides to use them) to his WP posts without using a plug-in?

1 Like

If you have too many plugins, or plugins that maybe conflict with each other, then yes they will slow down the website. But a few well-chosen plugins will not slow down the website. Having said that, I tend to avoid plugins except if really necessary.

But if meta description, etc is that important to you, why not try a plugin and test to see if it has any effect on the speed of your site.

1 Like

If this is true, then the “no plugin” way is not such a good idea.

To add a description, keywords, and other meta tags that are unique to each post or Page generated, you have two choices: you can add them as generic references or you can use plugins.

What the Codex means by a “generic description” is one that is appropriate to the entire site.

The “is_single” approach would stop the generic description from being included in single-post pages, reducing “duplication” by having the meta description be the post title alone for those pages.

If unique meta descriptions are wanted for single post pages, then the only two choices are custom theme code or a plugin.

Custom theme code would be equivalent to plugin. Except that the code would be in a different location, most of the hooks and actions would be the same. i.e. it would be a plugin by another name.

+1 sound advice.

@WebMachine i only use 3 plugins max as crashes my site.

so i always luk on options without plugin

seo plugin slows site ,so
@Mittineague @Noppy @SamA74 @WebMachine without plugin is dere way add meta title, meta description, meta keywords in every page,post archive,etc for seo

Ok so i don’t really use wordpress so i am perhaps assuming a few bits here but this is what i think happens. With the plugin for SEO it is likely to create an extra table (or field within an existing table of content) to hold the specific meta data for each page.

The problem you will have is that if there is nowhere to store the meta data you cannot dynamically call in that for each individual page, unless you manually add a table and amend the queries to include that table. Then you can echo out the meta data (if it exists) for that page.

You could create a table which you manually edit with id’s that relate to the WP id for that page and do a simple query but any update to WP could potentially wipe it out, but that would be hard to manage.

Alternatively you could try and call out some of the page content dynamically but you might find that gives unexpected results.

I don’t know if you can make an extra ‘field’ in the standard WP content system that you can use for meta tags and then echo that out to the head section? Which is basically back to the plugin, but might save a tiny bit of processing?

Hard coding a generic description as mentioned above is not great as it might not apply to every page and google will flag it as ‘html improvements’ in webmaster tools.

Hopefully my thinking isn’t hugely off and others can either confirm or correct as necessary

1 Like

Using custom fields might work. I have used them often for special content, but have never tried adding them in the head. But if it works, then you have input boxes on your edit screen that you can fill in with the meta title, meta description, and meta keywords when you add a new post or article.

Have you tried doing a search at

custom fields i know but they do same manul work ,so if u have 2000 post ,you will have 2 write 2000 meta title, meta description, and meta keywords manually
so i avoid it
I tried doing a search at ,but still searchg automatic way for my 2000 post

Do you know there are plugins that will make your WP site run faster? Perhaps you could use one of those and then also use a plugin to add a meta description and it would still be faster than it is now…