Streaming live at 10am (PST)

Og:url Open Graph Dynamic Link - How do you add this so as to query how many shares something has had?


#1

Hello Gang, I am using sumo.com on our site. Some of the share counters work and some dont on our articles.

https://www.plantbasednews.org/post/the-good-the-bad-and-the-eggly-smashing-the-myth-that-eggs-are-a-health-food is an example of one that does

And here is one that does not https://www.plantbasednews.org/post/5-surprising-studies-that-prove-veganism-is-growing-around-the-world

Sumo have advised me this:

've noticed there are no og:url meta tags defined on the pages you have linked to me. Share actually uses those og:url tags to lookup the exact URL & ask the social networks for the share count of that specific URL.

If you setup your og:url meta tag properly, Share will automatically read it & give you the exact number provided by social networks.

However; I cant see how I add the URL of the post in when editing the settings page of posts.

There appears to be no setting for the URL?

Do I need to add it to the < head > if so what do I add as the link? Just the root of the site? Or is there a bit of dynamic code that picks up the /posts/titleofthepostandarticle bit?

Thank you


#2

@laveritalondon

Yes the idea you have is partial solution already. What you need to do is copy the following to the <head> area of your posts template;

<meta property="og:url" content=" https://www.plantbasednews.org/post/5-surprising-studies-that-prove-veganism-is-growing-around-the-world" />

You will then highlight the last part of the url (5-suprising-.......) and click add field and select slug as shown below ;




You should end up with this and you should be good to go;


#3

Alex, you legend thank you so much!


#4

Very welcome and glad it helped.