WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Attachment description in title tag? (2 posts)

  1. cosmictap
    Member
    Posted 3 years 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. ;)

    Thank you!

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. cosmictap
    Member
    Posted 3 years ago #

    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.)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic