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.
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
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)
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!
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’);
code cannot be used. syntac error.
@simion C. please send the correct code to my email. I don’t understand the PHP code. ninaaireni@gmail.com
