Support » Plugin: WP Facebook Open Graph protocol » Changing the og:url output

  • Resolved scsmytty


    Hi there,

    We recently moved our site from our old domain ( to a new one ( 301 Redirects are in place and everything is hunky dory. I’m trying to set everything up so the Facebook likes on the posts at the original domain show up on the new domain. I’ve followed the facebook instructions here – I’m using Meta Tag Manager to add in the og:url tag for the old posts. The problem that I have is that there are now 2 og:url tags in the post. Is there a way to change og:url output on a post by post basis? (see following post as an example:

    P.S. I know that I’m not using the WP Facebook OGP plugin but I’ll switch if it can help fix my problem.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chuck Reynolds


    Hey man.
    Yeah I see you’re using YoastSEO right now. My plugin doesn’t do anything different than his in regard to OGP so they’re both going to return the current site URL for that post/page.

    I see that you have this too:

    <!-- Meta Tag Manager -->
    <meta property="og:url" content="" />
    <!-- / Meta Tag Manager -->

    While that’s fine, it’s displayed in source before YoastSEO’s output so Facebook will read the last one in source; ie not that one. So option 1 is to see if you can change the priority of that plugin’s output to something higher like 999 OR…

    YoastSEO allows for the filtering of the OGP URL output. Read about that here:

    Unfortunately there’s not a super easy way to do it; and I don’t even have anything built into my plugin to handle that as what you have is an edge-case. So I hope that helps you out man. Cheers!

    Thanks for the quick reply Chuck. Do you know if it is a problem having 2 og:url tags? I get a warning from the facebook share debugger that I should fix it, but it doesn’t specifically say what kind of problems could occur. I assume that it could confuse the facebook crawler. Is that it?

    Plugin Author Chuck Reynolds


    It is an issue… like i said FB will take the last appearing one in source. I’d suggest looking at the yoastseo filter route for long term.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing the og:url output’ is closed to new replies.