Open graph problem: Showing wrong description of homepage (2 posts)

  1. Chankey Pathak
    Posted 4 years ago #

    Check out this URL: http://developers.facebook.com/tools/debug/og/object?q=www.linuxstall.com

    Everything is fine except the last line which is

    Note: "Reference in Perl" is the most recent post at my site.

    When I share any of my post on facebook then it works fine but when I share the homepage (http://www.linuxstall.com) then it shows most recent post's description instead of the site's description.

    What is the reason of that? How can I correct that?

    I have configured open graph using YOAST.

    Check out this screenshot http://i.stack.imgur.com/GTqhj.png

    It is showing reference in Perl as description instead of the site's description.

  2. feios.gr
    Posted 4 years ago #

    Change line 124 to line 131 with:

     * Default url property, using the permalink for the page.
    function opengraph_default_url( $url ) {
      if ( empty($url) ) $url = get_permalink();
      if ( is_home() || is_front_page() ) $url = home_url();
      return $url;

Topic Closed

This topic has been closed to new replies.

About this Topic