jphilippe
Forum Replies Created
-
Thank you!
For anyone reading this post, it is possible to change the meta titles and meta description of each individual posts with the free version of Yoast plugin, read:
https://kb.yoast.com/kb/yoast-wordpress-seo-titles-metas-template-variables/#setting-up-templates
What I really need, is to have all my posts and pages have unique meta titles and meta description instead of just one generic meta for my site wide.
Any advice on how to get this done properly?
What would be the exact markup code and do I place it in the head:
function create_meta_desc() {
global $post;
if (!is_single()) { return; }
$meta = strip_tags($post->post_content);
$meta = strip_shortcodes($post->post_content);
$meta = str_replace(array(“\n”, “\r”, “\t”), ‘ ‘, $meta);
$meta = substr($meta, 0, 125);
echo “”;
}
add_action(‘wp_head’, ‘create_meta_desc’);I am taking about this plugin: https://ww.wp.xz.cn/plugins/head-meta-data/