WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
[resolved] og:description not using manually-set excerpt (8 posts)

  1. patternleaf
    Member
    Posted 6 months ago #

    Hi -

    Based on the documentation, namely

    Checking Autogenerate Descriptions will mean that All in One SEO Pack will automatically generate your OG:Descriptions for each Page or Post from the Excerpt, if you create one, or from the first 160 characters of your content if you do not create an Excerpt.

    My expectation would be that the og:description tag would be populated with the content of the manually-set excerpt for a post, if there is one. This doesn't seem to be happening on my client's site, and indeed the code doesn't seem to use the post_excerpt at all. In aioseop_opengraph.php, method All_in_One_SEO_Pack_Opengraph::add_meta, a truncated post_content is used to set the description rather than the post_excerpt.

    Replacing post_content with post_excerpt in that method does cause the description to be populated with the excerpt, though of course that change on its own doesn't provide a fallback if there's no excerpt.

    Anyway, just wondering if I'm missing something, or if I'm misreading the documentation, or this is a bug.

    thanks!

    http://wordpress.org/plugins/all-in-one-seo-pack/

  2. wpsmort
    Member
    Posted 6 months ago #

    Hi patternleaf,

    Yes, the Open Graph social meta module does not use the Excerpt because the Excerpt in WordPress does not meet the character length for Open Graph meta description.

    However, the Meta Description (not the OG:Meta Description) is generated from the Excerpt.

    We'll correct the help text for the Autogenerate OG:Meta Description field.

  3. patternleaf
    Member
    Posted 6 months ago #

    Hi wpsmort -

    Thanks for the response. I'm not finding a reference that specifies a length on the og:description. the main protocol page simply says "A one to two sentence description of your object," which is pretty much how my client, at least, is using the WP excerpt. If you have another reference, I'd appreciate it.

    Is there a place to formally log feature requests? If nothing else a filter on such properties that developers could hook into would be super. Could just be a single filter with parameters specifying the meta property and values… or does such a filter already exist? Haven't looked carefully yet if the aioseop_description filter works with open graph...

    Thanks!

  4. Peter Baylies
    Member
    Plugin Author

    Posted 6 months ago #

    Hi patternleaf,

    There isn't currently a hook for this, and there should be; I'll see about adding hooks for the meta tags here. It won't be the same hook, as aioseop_description is used for a different meta tag.

  5. patternleaf
    Member
    Posted 6 months ago #

    Thanks, Peter!

  6. Peter Baylies
    Member
    Plugin Author

    Posted 6 months ago #

    Hi patternleaf,

    In the latest update, there's now a filter that should work for you - the hook is called aiosp_opengraph_meta and it uses three arguments - the first is the content of the meta tag, the second is what platform it's used for (so currently facebook or twitter) and the third is what it's used for (in your case, description). So you should be able to filter the description now, or even filter both og:description and twitter:description separately, if you like. Let me know how it works out for you!

  7. MDS
    Member
    Posted 5 months ago #

    hi, is there a summarised solution on how to display "excerpt" in the og:description instead of displaying "description"? thanks.

  8. ssjaimia Per the forum welcome please post your own topic.

    http://wordpress.org/support/plugin/all-in-one-seo-pack#postform

    This topic is marked resolved already.

Reply

You must log in to post.

About this Plugin

About this Topic