WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] hcard field missing in google webmaster tools (7 posts)

  1. SpyderCanopus
    Member
    Posted 2 years ago #

    On: http://www.google.com/webmasters/tools/richsnippets?url=warriortom.com

    It says I am missing "name (fn)" hcard field.

    I've looked around for an hour or more and can't find how to remedy these warnings on the link above.

    I'm using the twenty ten theme.

  2. SpyderCanopus
    Member
    Posted 2 years ago #

    Messages are:
    Warning: At least one field must be set for Hcard.
    Warning: Missing required field "name (fn)".

  3. SpyderCanopus
    Member
    Posted 2 years ago #

    Thanks for the link. Where do I put the code, tho?

  4. As that page says:

    Each organization can have a number of different properties, such as its name, address, URL, and phone number. You can use microdata, microformats or RDFa markup to label these properties. Google recognizes the following organization properties, derived from the hCard microformat. In general, you can use the same property name for microdata, microformats, and RDFa; where the microdata/RDFa and microformats property names differ, the microformats property name appears in parentheses. Properties in bold are required.

    Use Microdata, microformats, or RDFa :)

  5. SpyderCanopus
    Member
    Posted 2 years ago #

    It doesn't make sense because I have this in author.php:

    <h1 class="page-title author"><?php printf( __( '%s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>

    it has the fn and n class after vcard, but the webmaster tools still don't see it.

  6. SpyderCanopus
    Member
    Posted 2 years ago #

    Omg I found the problem. I took the hyperlink off of the author name in functions.php.

    This,

    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    		'meta-prep meta-prep-author',
    		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    		),
    		sprintf( '<span class="author vcard">%3$s</span>',
    			get_author_posts_url( get_the_author_meta( 'ID' ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    			get_the_author()
    		)
    	);
    }
    endif;

    should have been like this:

    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    		'meta-prep meta-prep-author',
    		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    		),
    		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    			get_author_posts_url( get_the_author_meta( 'ID' ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    			get_the_author()
    		)
    	);
    }
    endif;

Topic Closed

This topic has been closed to new replies.

About this Topic