How to Optimize WordPress Posts for Social Media with Yoast SEO

How to Optimize WordPress Posts for Social Media with Yoast SEO

One of the greatest advantages of the Yoast SEO plugin is its social sharing features. It includes tools that make it easy to customize how your articles look when they are shared on social networks. The tools are not difficult to use and you can use as much or as little of the customizations that you want. In this article, we’ll look at how to set social sharing in Yoast and see what it can do for you.

What Can Go Wrong When Sharing Without Yoast

Sharing tools for Facebook and Twitter can use the wrong image, no image at all, and they pull the first text they see or the text you’ve entered as an excerpt as the description. Sometimes this is okay, but there are times when it would be beneficial to customize those images and description. By adding your own titles, description, or images you can tailor the post to the specific audience for that specific social network.

Let’s look at a few examples.

Article Example – Showing the Wrong Image

In this example, I wrote a post and included an image from the video I discussed in the article. I also set a featured image, which was a different image than the one I included in the article. When I clicked to share the article it pulled the image from the article rather than the featured image. It’s also pulling the first few lines of text from the article, which might not be the best choice as an article description.

Twitter displays the same information with the wrong image, title, and text pulled from the first few lines of the article.

Home Page Example – Not Displaying an Image

This is a page with no featured image set. It doesn’t show an image at all when the page is shared. What if you want to display a specific image that you aren’t using on this page? For the description, it’s using the text from the first few modules which include a tagline and contact information. In this case, it would also be a good idea to use a different title and description.

Twitter shows the generic title with a broken image. This isn’t visually appealing and not many would click on this link.

Yoast SEO Social Settings

Fortunately, all of these issues can be solve with Yoast’s social sharing settings.

Yoast adds a Yoast SEO box on each page and post. This box has lots of features including a social sharing tab. Within this tab are two more tabs: one for Facebook and one for Twitter. If you use these fields, the social sharing apps will pull their information from here because they are given priority.

The Facebook tab includes fields for the title, description, and an image. It includes a description of what each field does and includes a suggested image size for Facebook.

The Twitter tab includes the same fields, specifically for Twitter, and shows the suggested image size. This is mostly useful if you want to use different information for Twitter or use a featured image designed specifically for Twitter. If you want to use the same information as the Facebook tab you can leave the Twitter tab’s fields empty. They will automatically follow the Facebook tab’s settings.

Customizing Yoast SEO Social Settings

Here are a few examples of Yoast SEO Social Sharing in action.

Article Example with Yoast Social Sharing

Here’s a look at the Facebook tab. I’ve entered a new title, gave it a description, and supplied an image to show on Facebook.

The Facebook sharing app pulls its information from these fields and now shows the new title, description, and the correct featured image when I share the article on Facebook.

I didn’t add anything to the Twitter tab, so Twitter follows the same settings as Facebook.

Home Page Example with Yoast Social Sharing

For the home page, I included a custom title, description, and image in the Facebook fields.

The custom social sharing settings now show the new title, description, and image when I share the page on Facebook.

Again, I didn’t place anything in the Twitter fields, so Twitter shows the same image that Facebook shows.

Adjusting Twitter Separately

Of course, the advantage in having a Twitter tab is that you can adjust it separately from Facebook. Here are the Facebook settings for the Services page.

Here’s how the post will look when it’s shared on Facebook.

I’ve changed the Twitter settings while leaving the Facebook settings the same. I’m using the same title but I’ve changed the description and image.

Now when the post is shared to Twitter it will display the custom settings from the Twitter tab.

Troubleshooting Facebook Sharing

Sometimes when you make changes in Yoast’s social sharing settings Facebook doesn’t pick up on the posts’ new settings. The reason for this is the method Facebook uses to know what to use for the title, description, and image. It ‘scrapes’ your pages to get that information. Once it has scraped your page it doesn’t scrape it again. That information is stored on Facebook. Fortunately, there is an easy fix.

If Facebook doesn’t use your updated image you can have Facebook to re-scrape your page or post. You can do this manually using the Facebook Sharing Debugger tool. Paste in the URL of the page or post you want to debug and click the debug button.

This will show when it was last scraped and provide a link preview. If this doesn’t show your new settings then click Scrape Again.

Facebook’s debugger will ping the page or post again and display the new results. Now it shows the correct image, title, and description. This is an excellent tool and is easy to use.

Ending Thoughts

That’s our quick look at how to set social sharing in Yoast. Yoast SEO lets you set the title, description, and featured image for both Facebook and Twitter independently from your website and each other. If you want to use the same settings for both you can set them for Facebook and Twitter will use those settings. The settings are easy to adjust and you have full control over how your pages and posts look when shared on social media.

As a quick recap, here are the benefits of using Yoast SEO Social Sharing features:

  • Add social sharing information to a page that doesn’t have it
  • Use different text and images than what is found within a page or post
  • Solve issues with social networks using the wrong images when your posts are shared
  • Customize the title, description, and image to a specific social network

Do you use Yoast’s social sharing settings? Let us know about your experience in the comments.

Randy Brown

Randy A Brown is a professional writer specializing in WordPress, eCommerce, and business development. He loves helping the WordPress community by teaching readers how to improve their websites and businesses. His specialties include product reviews, plugin and theme roundups, in-depth tutorials, website design, industry news, and interviews. When he's not writing about WordPress he's probably reading, writing fiction, or playing guitar.