[Plugin: WordPress SEO by Yoast] Set Description with PHP
-
I’m adding to post meta for WPSEO with the code below
update_post_meta($post_id, '_yoast_wpseo_focuskw', ''); update_post_meta($post_id, '_yoast_wpseo_title', ''); update_post_meta($post_id, '_yoast_wpseo_metadesc', $media->group->description); update_post_meta($post_id, '_yoast_wpseo_meta-robots-noindex', 0); update_post_meta($post_id, '_yoast_wpseo_meta-robots-nofollow', 0); update_post_meta($post_id, '_yoast_wpseo_meta-robots-adv', 'none'); update_post_meta($post_id, '_yoast_wpseo_sitemap-include', '-'); update_post_meta($post_id, '_yoast_wpseo_sitemap-prio', '-'); update_post_meta($post_id, '_yoast_wpseo_canonical', ''); update_post_meta($post_id, '_yoast_wpseo_redirect', '');
I get this error message in the edit post screen of wordpress
Warning: WPSEO_Metabox::do_meta_box() [wpseo-metabox.do-meta-box]: Node no longer exists in /…/wp-content/plugins/wordpress-seo/admin/class-metabox.php on line 326
The metabox does not show the description from the sql database and I’m currently at a loss of where to go from here.
ANY IDEAS?
- The topic ‘[Plugin: WordPress SEO by Yoast] Set Description with PHP’ is closed to new replies.