WordPress.org

Forums

[resolved] [Plugin: WordPress SEO by Yoast] WC3 identifies Opengraph metadata as invalid (9 posts)

  1. billbennett
    Member
    Posted 4 years ago #

    Ran a check of my sites HTML at http://validator.w3.org.

    The validator found 11 errors - all related to OpenGraph

    including:

    Element meta is missing one or more of the following attributes: http-equiv, itemprop, name.
    …' content='Bill Bennett | journalist'/><meta property='og:description' content…

    and

    Attribute property not allowed on element meta at this point.
    …ogy and business. News, features etc'/><meta property='og:url' content='http:/…

    I can supply the others if they are relevant.

    What is going on here and does it need fixing?

  2. Joost de Valk
    Member
    Posted 4 years ago #

    Not much to do about that right now, doesn't really matter either :)

  3. Joseph Fneisz
    Member
    Posted 4 years ago #

    Yes it does matter. There is a way to pass the validator.

  4. Joseph Fneisz
    Member
    Posted 4 years ago #

    You can read more about this at the end of my new article:
    http://marfalkov.wordpress.com/2011/05/07/open-graph-custom-fields/

  5. Joost de Valk
    Member
    Posted 4 years ago #

    If your theme were valid and had a language_attributes call, that would have been added automatically.

  6. billbennett
    Member
    Posted 4 years ago #

    Thanks Joost, that's just the help I needed.

    I was trying to be clever and changed

    <html <?php language_attributes(); ?>>

    to

    <html dir="ltr" lang="en-NZ">

    The validator doesn't like it. It turns out the NZ should be lower case.

  7. Joseph Fneisz
    Member
    Posted 4 years ago #

    Bill, You don't have to use the second tag, unless you build different content for different english versions on your site.

    Here are some sample language codes:

    "en": English
    "en-US": the U.S. version of English.
    "en-cockney": the Cockney version of English.
    "i-navajo": the Navajo language spoken by some Native Americans.
    "x-klingon": The primary tag "x" indicates an experimental language tag

    more: http://www.w3.org/TR/html401/struct/dirlang.html

  8. Joost de Valk
    Member
    Posted 4 years ago #

    @billbennett: This solves the issue though? :)

  9. billbennett
    Member
    Posted 4 years ago #

    @joostdevalk

    Yes, it's fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic