Code Element Ym

Get WordPress Post Type Archive Meta Description from Yoast

You can use the snippet below to output the Yoast Archive meta description for a Custom Post Type in WordPress.

Replace:

custom-post-slug: with the slug of your target post type

$post_type_slug = 'custom-post-slug';
$yoast_titles = get_option( 'wpseo_titles' );
echo $yoast_titles['metadesc-ptarchive-' . $post_type_slug];