• Resolved Vikas Khunteta

    (@vikas_khunteta)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fix missing field “url” in Google Search’ is closed to new replies.