Changing the og:url output

Last update: 01 June, 2017
This guide is written for advanced users and developers. Looking for a web developer to customize our plugin? We highly recommend checking out Code Poet as they have a great list of available freelance WordPress developers.

The og:url tag pulls from the permalink of the post/page. When the permalink changes so will that og:url. While this is accurate is most cases, you or your developer can use the wpseo_opengraph_url filter to customize this feature.

The most common request to change the og:url is when a site migrates to https and wants to keep their previous share counts. The following code will change all og:url output so it starts with http. The code would be placed in the functions.php of your theme. If you are not sure where that is or how to do that please speak with your host provider or consider hiring a developer.

Was this article helpful? ·