Fix missing field “url” in Google Search
-
Hello,
Please fix the missing field “url” in Google search rich results
There is only one line required to fix the problem.
in your wp-postrating.php file, add “url” property after “name” property
1246.
$post_meta .= '<div style="display: none;" itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
1247.$post_meta .= '<meta itemprop="name" content="' . get_bloginfo( 'name' ) . '" />';
// This line needs to be added to fix the issue
1248.$post_meta .= '<meta itemprop="url" content="' . home_url() . '" />';
1249.
$post_meta .= '<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
1250.$post_meta .= '<meta itemprop="url" content="' . $site_logo . '" />';
1251.$post_meta .= '</div>';
1252.$post_meta .= '</div>';
For more information, please visit
https://developers.google.com/search/docs/data-types/logo
https://schema.org/Organization
- The topic ‘Fix missing field “url” in Google Search’ is closed to new replies.