How to set custom Twitter meta tags
Yoast SEO includes the option to set custom Twitter images, titles and descriptions on a page by page basis after you have enabled Twitter meta data. The social tab of the meta box allows you to set a custom image, title and description on each post, page or taxonomy.
- Log in to your WordPress website.
When you’re logged in, you will be in your ‘Dashboard’.
- Edit the post, page or other custom post type you’d like to exclude.
On the left-hand side, you will see a menu. In that menu, navigate to the post, page or other custom post type you’d like to exclude.
- Open the Yoast SEO sidebar and click on the Twitter preview tab.
- Enter the Twitter image, title, and description.
One of the Yoast SEO for WordPress Premium features is the ability to see what your post will look like when sharing on Twitter.
Changing The Twitter Metatags
Changing the Twitter URL Metatag
If you want to change the Twitter URL metatag, you will need to use the filters we have for OpenGraph tags, as Twitter uses the og:url to display it in Google. You can view the filters here.
Changing the Twitter:Image Metatag
To change the Twitter:image tag use the filer: wpseo_twitter_image instead of the wpseo_opengraph_type filters we have here.