Tagged: x
-
AuthorPosts
-
September 6, 2016 at 3:40 am #1162713
Hi,
You can try this third party plugin.
https://wordpress.org/plugins/all-in-one-schemaorg-rich-snippets/
Hope that helps.
September 8, 2016 at 2:32 am #1165961Ok, I am seeing the errors are increasing so Im not sure if the code I used fixes it. I used that plugin in the past and that didnt help much. In the past I had TwentyFourteen, I think this is the code I used to fix it. Can you please provide a similar code for theme x, integrity with the author?
if ( ! function_exists( 'twentyfourteen_posted_on' ) ) : /** * Print HTML with meta information for the current post-date/time and author. * * @since Twenty Fourteen 1.0 * * @return void */ function twentyfourteen_posted_on() { if ( is_sticky() && is_home() && ! is_paged() ) { echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; } // Set up and print post meta information. printf( 'UPDATED <span class="entry-date updated"><a href="%1$s" rel="bookmark"><time class="entry-date updated" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', esc_url( get_permalink() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); } endif;
September 8, 2016 at 4:04 am #1166116Hello There,
Using the same code, you ca update it and use this instead:
if ( ! function_exists( 'twentyfourteen_posted_on' ) ) : /** * Print HTML with meta information for the current post-date/time and author. * * @since Twenty Fourteen 1.0 * * @return void */ function twentyfourteen_posted_on() { if ( is_sticky() && is_home() && ! is_paged() ) { echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; } if ( is_single() ) { // Set up and print post meta information. printf( 'UPDATED <span class="entry-date updated"><a href="%1$s" rel="bookmark"><time class="entry-date updated" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', esc_url( get_permalink() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); } } add_filter('the_content', 'twentyfourteen_posted_on'); endif;
Please let us know if this works out for you.
September 8, 2016 at 6:40 am #1166234Thanks for the code but I am using your theme now and not TwentyFourteen. The code you gave still has TwentyFourteen in it. Can you please provide the function code for integrity theme so I can get the updated and missing author errors fixed in google webmaster?
September 8, 2016 at 10:09 am #1166517I just want to make sure that code you gave will work even though I am not using TwentyFourteen anymore.
September 8, 2016 at 11:58 am #1166675Hi there,
Please try this:
if ( ! function_exists( 'x_posted_on' ) ) : function twentyfourteen_posted_on() { if ( is_sticky() && is_home() && ! is_paged() ) { echo '<span class="featured-post">' . __( 'Sticky', '__x__' ) . '</span>'; } if ( is_single() ) { // Set up and print post meta information. printf( 'UPDATED <span class="entry-date updated"><a href="%1$s" rel="bookmark"><time class="entry-date updated" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', esc_url( get_permalink() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); } } add_filter('the_content', 'x_posted_on'); endif;
Hope this helps.
September 8, 2016 at 12:51 pm #1166744Thank you, I will know in a few days if that worked
September 8, 2016 at 1:10 pm #1166786Feel free to let us know how it goes.
Thanks.
September 13, 2016 at 8:29 am #1173024I am still waiting for the strucutured data to be updated. I did notice entry-title for pages are missing for pages I disabled the page title in. Does disabling the page title removes it or makes it hidden? If it removes it, will putting this in the css do the job if I enable the page title again inside pages?
.page-id-XXXX .entry-title {display: none;}
September 13, 2016 at 1:52 pm #1173599Hi there,
Disabling the page title option would remove the title in the actual markup and yes, the code you have provided will still have the title in the markup but will hide it in the page.
September 14, 2016 at 3:04 am #1174440Thank you. I would consider making the disable page title hidden rather than removing it completely because it could damages the SEO of the given page. I will make the required changes. I still dont know if the other code fixed the missing updated and missing author,
September 14, 2016 at 8:00 am #1174724Hi There,
Let us know if you need further help,
Joao
September 21, 2016 at 5:15 am #1184387This reply has been marked as private.September 21, 2016 at 5:57 am #1184433Hi,
Can you provide us the exact url of the two new posts.
Thanks
September 21, 2016 at 6:13 am #1184452This reply has been marked as private. -
AuthorPosts