Support » Plugins and Hacks » Yoast SEO » [Plugin: WordPress SEO by Yoast] Attachment description in title tag?
5 years, 8 months ago
Just installed this – what a great plugin.
I don’t see a way in the options for “titles” to utilize the “description” from a media/gallery item in the attachment page title. Is there?
I’d like the meta description for each attachment page to pull from the attachment’s “description” field, as weird as that may sound. 😉
For others who may want to do this, I have found apparent success by adding this line:
'%%att_desc%%' => $r->post_content,
to the end of the
$replacements = array(
function in wpseo-functions.php.
(And then, of course, using the %%att_desc%% variable appropriately in the SEO title options.)