PHPMatters Help You Better Hosting Your PHP-based Sites
How to Embed Tweets on Your Personal Blogs or Websites with the Best Appearance

How to Embed Tweets on Your Personal Blogs or Websites with the Best Appearance

With the immense popularity of Twitter, webmasters now have made full use of this platform to expand their influences among Twitter users, with a view to increasing their website traffic in turn. For instance, some of these people add a Twitter embedded timeline on their homepages to better showcase the updated tweets, and others simply create a Twitter Card to attach the blog posts with tweets perfectly. This time, we’d like to tell you how to embed tweets directly to the content of your post or website.

To be honest, webmasters now have enriched their blog posts greatly using different formats other than the textual contents and images, such as maps, music players, video players, apps, photo galleries, and many more. Attaching embedded tweets, moreover, is another perfect way to diverse the posts, and in the meanwhile, to integrate your Twitter account with your website tightly.

How to Add Embedded Tweets

Frankly speaking, this practice is pretty easy to handle. You only need to go for a specific tweet you’d like to showcase in your content, and click the more action from its bottom. Note that every tweet has a set of actions including photo viewing, favorite, reply, and retweet. The tweet embedding is hidden into the dropdown menu of the More option. Within it, you can also pin to your Twitter profile.

embed tweet

Then, the needed coding stuff can be created immediately. Before copying and pasting the HTML code into of your target webpage with the proper placement you want, you’d better check the preview section firstly to see whether the appearance and the way it displays can fully meet your requirements.

embedded tweet preview

This graphical example is the standard embedded tweet generated by Twitter. It includes your featured image that is already expanded, your Twitter account, the post title along with a brief summary, the publish date, and the number of retweets and favorites in real time. In addition, there is a Twitter Follow Button integrated automatically, allowing readers to follow your account directly from your webpage if they are interested in your tweet. Moreover, this embedded tweet is pretty interactive, allowing people to reply, retweet and favorite your tweets simply from the bottom box.

How to Customize the Tweets

Sometimes, you may dislike the default appearance of your embedded tweet after checking the preview section. In this case, you can make some modifications of the code using the corresponding attributes.

Disable Conversation

Disable Conversation

Hide Twitter Cards

Hide Twitter Cards

Decide the Width and Height

Decide Width and Height

Set the Alignment

Set Alignment

Choose the Theme and Color

Choose Theme and Color

After modifying the code based on your preferences, now you can copy and paste the code into any webpage you want the tweet to display. Here, we have to mention that unlike the embedded Twitter timeline that would be better to be added into the homepage or the website sidebar as it displays multiple tweets and updates for the latest information uninterruptedly, the embedded tweet is fixed that needs to be added into one of your blog post or webpage.

Easier Option

Without doubt, adding a tweet to your content is an easy task. If you are using WordPress or some other quality content management systems for website building, the things can be even easier as these tools have their in-build workflow for tweets embedding.

In this case, you only need to copy the URL of your target tweet, and paste it to your post. Then, the CMSs can add the proper code automatically and display your tweet perfectly. To find the URL, simply click the Details option next to the publish time.

tweet details