Quantcast
Channel: WordPress.org Forums » [Yoast SEO] Support
Viewing all articles
Browse latest Browse all 41911

Add/update SEO metakeywords programmatically

$
0
0

Replies: 0

Hello,

Could you tell me please, what is the best way to add/update SEO metakeywords programmatically?

i looked it up and found on this article how to update meta title and meta desc : https://ehikioya.com/how-to-update-yoast-seo-fields-programmatically/

when i tried to update the meta key words with the same code it wont work.

$updated_title = update_post_meta($post_id, ‘_yoast_wpseo_title’, $metatitle); //working
$updated_desc = update_post_meta($post_id, ‘_yoast_wpseo_metadesc’, $metadesc); //working
$updated_kw = update_post_meta($post_id, ‘_yoast_wpseo_metakeywords’, $metakeywords); // not working


Viewing all articles
Browse latest Browse all 41911

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>