- This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by
Andrew Misplon.
- AuthorPosts
- October 2, 2017 at 5:04 pm #7933
Andrew MisplonKeymasterHi Reid
Thanks again for posting.
That’s my fault, try the following instead:
if ( ! function_exists( 'ultra_post_class_filter' ) ) : /** * Filter post classes. * @link https://codex.wordpress.org/Function_Reference/post_class. */ function ultra_post_class_filter( $classes ) { $classes[] = 'post'; // Resolves structured data issue in core. See https://core.trac.wordpress.org/ticket/28482. if ( is_page() ) { $class_key = array_search( 'hentry', $classes ); if ( $class_key !== false) { unset( $classes[ $class_key ] ); } } $classes = array_unique( $classes ); return $classes; } endif; add_filter( 'post_class', 'ultra_post_class_filter' );
October 2, 2017 at 5:13 pm #7934
ReidParticipantGreat, thanks. Revised the code as instructed and the errors are no longer appearing. Will validate with console over the next few days to see if the crawl errors resolve. I appreciate all you help!
October 2, 2017 at 5:17 pm #7935
Andrew MisplonKeymasterSuper, glad that helped.
On your blog page and single post pages, the author, updated time and title are all there. The snippet you’ve used will hopefully allow Google to differentiate between pages and posts (syndicated content), thereby not expecting all that info from pages.
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.