Hello again, @yworld
There is a little problem with this. Basically there is no official WordPress function which generates the meta-description-tag. Thats why you usually define it in your themes header.php by yourself with something like this:
<meta name="description" content="<?php bloginfo('description'); ?>" />
The problem is now: If you have already defined something like this hardcoded in your themes header.php file or it gets generated by other plugins (like some SEO plugin) it means that there will be a duplicated meta-description-tag when I also add one via my plugin. Because there is no official WordPress function which generates it, its impossible to just overwrite it. Basically I can check and parse the header if there is already some meta-tag generated by another plugin/theme and just replace it but this can still lead to problems with other plugins which do the same.
So basically the best way would be to write your own plugin or define the logic for it in your themes header.php somehow by yourself. See this article for more information:
https://codex.www.ads-software.com/Meta_Tags_in_WordPress#Generic_Meta_Tags
-
This reply was modified 8 years, 3 months ago by
Asgaros. Reason: Typos
-
This reply was modified 8 years, 3 months ago by
Asgaros.