WordPress.org

Forums

In Twenty Ten Theme: Erro: Missing required field "updated" and hCard "author". (5 posts)

  1. Martin
    Member
    Posted 1 year ago #

    I'm using Twenty Ten theme and getting these data structure errors:

    Erro: Missing required field "updated".
    Erro: Missing required hCard "author".

    I already search for a solution to fix this, and found many solutions which none of them worked for Twenty Ten theme.

    I tried the solution below found on this forum for Twenty Eleven, adding these lines to my fuctions.php file (child theme). That also didn't work.

    function twentyten_posted_on() {
    printf( __( '<span class="sep">Posted on </span><time class="entry-date updated" datetime="%3$s" pubdate>%4$s</time><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"></span></span>', 'twentyten' ),
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( 'c' ) ),
    esc_html( get_the_date() ),
    esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    get_the_author()
    );
    }

    I'm assuming it didn't work because when I go to Google Webmaster Tool and test it, I still get the same errors. I'm not sure if I have to wait to test it after I make these changes.

    Any help will be appreciated.

    Thanks.

  2. Martin
    Member
    Posted 1 year ago #

    Does the above change in the functions.php file affect all the pages and posts already published or just the ones that will be published after the change?

    [ Please do not bump ]

  3. mespinelli
    Member
    Posted 1 year ago #

    i am having the same issue. the twenty eleven code you're using does not apply to the twenty ten version. there is no page for twenty ten. does anyone have a fix?

    the code on line 581 is:

    printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),

    The whole section reads as follows:

    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;
    
    if ( ! function_exists( 'twentyten_posted_in' ) ) :
    
    /**
  4. Mangusta76
    Member
    Posted 1 year ago #

    Please, anybody?

  5. Andrew
    Forum moderator
    Posted 1 year ago #

    You can create your own thread here: http://wordpress.org/support/theme/twentyten#postform

Topic Closed

This topic has been closed to new replies.

About this Topic