Override Yoast SEO snippet with custom text/description
-
I have a WordPress site with Yoast SEO installed on it. I have a certain page,
/charts
, which accepts the GET parameterid
. Based on the value of ID, I want to load a title and description from a text file on the server, and set it as the title and description that shows up on a snippet when you paste the link on Twitter, Facebook, Slack, etc.Yoast overrides that with its logic, and I could not figure out if a custom variable in Yoast could be set up that sets the title and description from the file based on
id
‘s value. I ended up trying this solution to bypass Yoast for that particular page but as a result, no snippet shows up at all when I paste the link.Note that apart from this
/charts
page, I do not want to alter Yoast’s behaviour anywhere on the site. Is a solution possible to the same that changes the title and meta description dynamically with theid
value in the GET parameter?
- The topic ‘Override Yoast SEO snippet with custom text/description’ is closed to new replies.