updated, author and entry-title Search Console Markup: microformats.org

Posted in: Newspaper
Post count: 49

Hello, I have to insert “updated, author and entry-title” in the related images under the articles. I need to know how to do it because otherwise in the searc console of Goole I am shown many errors (which in reality there are not). I ask you on which file to intervene and what code I have to put https://www.screencast.com/t/8julRsPJ image https://www.screencast.com/t/Qj2DdOXg

  • This topic was modified 8 years by Rodolfo.
Post count: 20685

Hi,

That is unusual, the theme adds the necessary structured data markup so there would be no reason to detect those as missing. There are no errors when testing a post with the Google provided tool
https://search.google.com/structured-data/testing-tool/u/0/
Maybe you could check the error report and see what exactly is specified there
https://support.google.com/webmasters/answer/2650907?hl=en

Post count: 49

I state that everything works and the org scheme is perfect and not mistakes.
Given this on the webmaster tool are shown errors as image flooded in the previous ticket. To solve it it is recommended to insert some code under the images below

//risoluzione problemi dati strutturati articoli
function add_mod_hatom_data($content) {
$iso8601_date = get_the_time(‘c’);
$author = get_the_author();
$title = get_the_title();
if(is_single()) {
$content .= ‘<div class=”hatom-extra”><span class=”entry-title”>’.$title.'</span>
ultima modifica: <span class=”updated”> ‘.$iso8601_date.'</span>
da <span class=”author vcard”><span class=”fn”>’.$author.'</span></span></div>’;
}
return $content;
}
add_filter(‘the_content’, ‘add_mod_hatom_data’);

I wanted to ask you where and if they are looking for other solutions. Despite this problem, if I do the verification from the various Google tools everything works perfectly. I hope I have explained myself well (I am not the master of the language)

Post count: 49

I leave this link sove I found a possible solution, I apologize if it is in Italian (maybe you can understand the same)
PS: excellent work for everything

link

Post count: 20685

Glad you could find a solution that works for you in this matter. It is unusual that Google sometimes detects missing structured data when in fact it is available. Thank you for posting the solution you found, maybe users in similar situations will find it helpful.

Thank you!

Post count: 24

hello .. where do I need to enter the code? where did the code start? does it start with the word // risoluzione problemi from strutturati articoliri?

function add_mod_hatom_data($content) {
$iso8601_date = get_the_time(‘c’);
$author = get_the_author();
$title = get_the_title();
if(is_single()) {
$content .= ‘<div class=”hatom-extra”><span class=”entry-title”>’.$title.'</span>
ultima modifica: <span class=”updated”> ‘.$iso8601_date.'</span>
da <span class=”author vcard”><span class=”fn”>’.$author.'</span></span></div>’;
}
return $content;
}
add_filter(‘the_content’, ‘add_mod_hatom_data’);

Post count: 24

code cannot be used. syntac error.

https://www.screencast.com/t/QEDF7GlFO

Post count: 20685

@nina The forum will corrupt the ” and ‘ characters mostly, replace them when adding the code. Code should be wrapped in the code tag when posted.
Difference
‘ ”

' "

Post count: 24

@simion C. please send the correct code to my email. I don’t understand the PHP code. ninaaireni@gmail.com

Post count: 20685
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.