We use dynamic content on all pages and posts to pull in the post / page title, and on posts an extra ACF field of ‘subtitle’, and use that for the heading at the top of the page.
This works great in the page editor and on the front-end, but in the generated og:description, it is pulling the post title and ACF data from different posts. Have noticed that this is showing up inside the [cs_content_seo] shortcode generated within the post content which gets used for generating the excerpt / og:description.
For example, this post: https://connexxions.me/2020/01/ben-mowat-photography-studio-recording-session/
The post title is “Ben Mowat” and the ACF field ‘subtitle’ is “Studio recording session”, but in the og:description meta, and in the [cs_content_seo] shortcode, it is being pulled in from a different post: “Sust!:health retreat logo design Brand identity, Graphics & Illustration show text hide text Commissioned photoshoot of a studio recording session for”
Looking at this output, it looks like a deeper issue of global $post not being the correct current post when generating the content for [cs_content_seo], as there is also a custom element here which displays the taxonomies of the current post, which for the “Ben Mowat” post should be “Photography”, but in the og:description meta / [cs_content_seo] is showing up as “Brand identity, Graphics & illustration”, which is being taken from the other post (“Sust!”)
I would be grateful for some assistance in getting to the bottom of this issue
Thanks