Adding meta tag without plugin

Is it possible to add meta title, meta description, meta keywords in every page,post archive,etc …let me know

Did you search in the wordpress.org plugin repository? There are quite a few plugins that came up for my search: one of the first ones I came up with was https://wordpress.org/plugins/head-meta-data/.

Just make sure the plugin you choose is compatible with your version of WordPress (and that should be the most recent one), that it has been updated recently, and that it has had a lot of downloads (so is trusted by a lot of users).

I need to add meta title, meta description, meta keywords in every page,post archive,etc …without plugin

Then your only other option is with theme

https://codex.wordpress.org/Meta_Tags_in_WordPress

It is important for website developers to understand that a default installation of WordPress does not contain the description and keywords meta tag data. Meta tags can be added manually, through changes to the Theme template files or through WordPress Plugins.

IMHO probably more trouble than it would be worth.

Why do you want them?

Why do you want them?

To savoid slow site by plugins

I didn’t mean why don’t you want to use a plugin.

I meant why do you want meta description and keyword tags.
AFAIK they both are essentially unused by anything.

AFAIK its slows site
I’ve 2000 posts so 2 avoid manual job i need automatic meta title meta description and keyword tags.

Not having meta description and keyword tags will not slow down the site.

I mean plugins slow my site

And as I’ve tried asking twice before, I am not asking about plugins.

I am asking why you want meta description and keyword tags at all, regardless of how they get there.

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.

https://codex.wordpress.org/Meta_Tags_in_WordPress#Generic_Meta_Tags

Tnx

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.

2 Likes

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: https://support.google.com/webmasters/answer/35624?hl=en

3 Likes

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.