Customize the Width and Height of Embedded Tweets in WordPress

WordPress 3.4 has been released with new features like Theme Previewer and Customizer, better Caption, header and background image coming from media gallery and many more performance improvements. WordPress team keeps coming with new features and enhancements in every upgrade. Apart from the new features mentioned earlier, 3.4 is also having capability to embed Twitter Status (also known as Tweets) inside the post area.

To embed a tweet inside a post, you only need to paste the Tweet URL which you can get by clicking the ‘details’ link just below a tweet on the timeline. Here is an example showing embedded tweet from my Twitter account.

Not Sure If Your PC is Infected with Malware or Virus? Use Free Scan Tools from Market Laders http://t.co/c6gTI0BM

Set the width and height of embedded media inside posts or pages. It will work for Tweets, YouTube, Vimeo, Hulu, Flickr and many more

Here you can enter the width and height that you want for embedded tweets. This same width and height will be applicable for all embeds done inside the WordPress using oEmbed method. For example, if you are using WordPress 2.9 or later, you can paste the URL of YouTube of Vimeo video and that will appears as IFRAME embedded video inside the post. The set width and height in Embed section will be applicable for those embeds as well.

Update – In WordPress 3.9, the Embeds option on Settings ==> Media page has been removed. The embedded media like Tweet will get default width and to change the width and height of that tweet, you can wrap the tweet inside embed shortcode code. For example,

To set the width as 300px and height as 200px, I used the below shortcode,

Result,

Not Sure If Your PC is Infected with Malware or Virus? Use Free Scan Tools from Market Laders http://t.co/c6gTI0BM