Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 5 replies, 2 voices, and was last updated 12 years, 1 month ago by
Steven Zahm.
-
AuthorPosts
-
07/12/2014 at 10:35 pm #296909
Craig
ParticipantI’m not sure how long this has been an issue, but Google’s Webmaster Tools has been kicking up errors on my Connections pages for the past few weeks about the following errors:
Error: Missing required field “entry-title”.
Error: Missing required field “updated”.The problem is on all of my entries, and after doing a little digging it seems the entry-title error does not appear on older versions of the templates. (cMap 3.1 does not have the error, but it still has the “updated” error.)
So version 4.0 of the cMap and Market templates may have introduced the entry-title bug, but I’m not sure if the “Updated” field has ever been working, as checking older versions all show the error still appearing.
I was able to check multiple versions by checking other Connections sites using the following tool:
https://www.google.com/webmasters/tools/richsnippets
The error appears when checking the cmap and market templates running on this site as well, although I strangely found one site using Market 4.0 where the entry-title error did not appear, so it may be a conflict with some themes?
-
This topic was modified 12 years, 1 month ago by
Craig.
07/14/2014 at 3:01 pm #296965Steven Zahm
Keymaster@ Craig
This is a theme SEO issue for establishing the authorship of a page using the hAtom microdata markup. The entry data for Connections is marked up in the hCard microdata format which is not what the rich snippet tool is validating.
I found the following on the on the WordPress Support Forums:
//mod content function hatom_mod_post_content ($content) { if ( in_the_loop() && !is_page() ) { $content = '<span class="entry-content">'.$content.'</span>'; } return $content; } add_filter( 'the_content', 'hatom_mod_post_content'); //add hatom data function add_mod_hatom_data($content) { $t = get_the_modified_time('F jS, Y'); $author = get_the_author(); $title = get_the_title(); if ( is_single() || is_page()) { $content .= '<div class="hatom-extra"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data');Dropping that in the theme’s
functions.phpfile should fix the error messages in the web master tools.One of the SEO enhancements on my to do list will be to filter (set) the page date created/modified of a single entry to the entries created/modified dates instead of using the page’s.
Hope that helps!
07/14/2014 at 8:35 pm #296995Craig
ParticipantWorked perfectly, thanks!
I dropped the code into Code Snippets instead of functions.php, which I know you’ve recommended before and is always better than directly modifying functions.php to prevent your changes from being overwritten if you ever update your theme – but I figured I’d mention it here just in case anyone else wants to add this code as well.
07/15/2014 at 12:55 am #297004Craig
ParticipantJust ran into a problem with the code. While it does remove the errors, it now puts the words “(page) was last modified: (date) by (author)” on every single page on my site, so this code snippet isn’t going to work.
I’ll try to read up more on it to see how I can add the info without adding that statement onto every page.
Thanks again.
07/15/2014 at 1:30 am #297005Craig
ParticipantAfter a little bit of digging I found the fix. Just a slight modification to the code:
//mod content function hatom_mod_post_content ($content) { if ( in_the_loop() && !is_page() ) { $content = '<span class="entry-content">'.$content.'</span>'; } return $content; } add_filter( 'the_content', 'hatom_mod_post_content'); //add hatom data function add_mod_hatom_data($content) { $t = get_the_modified_time('F jS, Y'); $author = get_the_author(); $title = get_the_title(); if ( is_single() || is_page()) { $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><<span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data');In any case, it’s obvious that this problem is not in any way related to Connections-Pro and is instead a widespread WordPress problem – so your assistance in resolving it was above and beyond anything anyone could expect of you, and just one more reason why I can’t recommend this plugin to anyone interested in purchasing it enough.
07/15/2014 at 8:53 am #297008Steven Zahm
Keymaster@ Craig
Yes, this would put text on the page, apologies for not pointing that out!
I took a quick look at your tweak, looks like you have an extra angle bracket on the
hatom-extraline. This fixes it://mod content function hatom_mod_post_content ($content) { if ( in_the_loop() && !is_page() ) { $content = '<span class="entry-content">'.$content.'</span>'; } return $content; } add_filter( 'the_content', 'hatom_mod_post_content'); //add hatom data function add_mod_hatom_data($content) { $t = get_the_modified_time('F jS, Y'); $author = get_the_author(); $title = get_the_title(); if ( is_single() || is_page()) { $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data');I was just about to hit the submit button to post my reply…
I really do not like the
entry-contentspan that is being applied … if your content has any block level HTML elements then HTML code is invalid. A better solution (as long as the theme is using thepost_class()function like they should be) would be this://mod content function hatom_mod_post_content ($content) { if ( in_the_loop() && !is_page() ) { $classes = 'entry-content'; } return $classes; } add_filter( 'post_class', 'hatom_mod_post_content'); //add hatom data function add_mod_hatom_data($content) { $t = get_the_modified_time('F jS, Y'); $author = get_the_author(); $title = get_the_title(); if ( is_single() || is_page()) { $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data'); -
This topic was modified 12 years, 1 month ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
