Skip to content

Instantly share code, notes, and snippets.

View donohoe's full-sized avatar

Michael Donohoe donohoe

View GitHub Profile
/*
In Wordpress, using the "The SEO Framework" plugin, we want to break the inheritance
between the Meta Title and that of OpenGraph/Twitter Title (we also do this for Description but the approach is the same).
While the PHP code appears to work, the 'placeholder'
on the field INPUT and TEXTAREA elements still reflects the original behaviors.
This (hacky) code solves for that though a better approach is desired.
This would break if element IDs were to change in the future.
You also need to ensure you DO NOT run this code until the element exists.