Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’)
Here is the relevant portion of my page template code: $yoast_meta = get_post_meta($post->ID, '_yoast_wpseo_metadesc', true); function my_service_template_footer_data() { echo "<script type='application/ld+json'> { '@context': 'https://schema.org/', '@type': 'Service', 'serviceType': ' " . get_the_title() . " ', 'description': ' " . $yoast_meta; . " ', 'provider': { '@type': 'LocalBusiness', 'name': '…', 'address': { '@type': 'PostalAddress', 'addressLocality': '…', 'addressRegion': … Read more