Embedding Tweets

Twitter’s update comes with a handy new feature: embedding tweets, and even better, with shortcodes, but it does come with a fairly big caveat. From the docs:

WordPress.com and WordPress VIP blogs have this functionality immediately, and Jetpack users will get it with their next update

So we’ve gotta go back to using full HTML code. Here’s an example:

The code for which looks like this:

<blockquote class="twitter-tweet"><p>Twitter have enabled support for embedding tweets.Handy... <a href="http://t.co/t2zjwuqN" title="https://dev.twitter.com/blog/tweets-and-buttons">dev.twitter.com/blog/tweets-an…</a></p>&mdash; cerealkillers (@cerealkillers) <a href="https://twitter.com/cerealkillers/status/146571451753971714" data-datetime="2011-12-13T12:45:31+00:00">December 13, 2011</a></blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Hopefully shortcode support won’t be too far behind in a normal WordPress installation, but for now, just follow the instructions in the docs and you’ll be all set.

WordPress Child Themes

The site you’re looking at is styled with a child theme. WordPress introduced child themes in version 2.7 and they’re great. It means that you can cleanly modify an existing theme, and if the original writer publishes an update, your changes will simply be applied on top of theirs. The CSS file for the theme I’m using now looks like this:

/*
Theme Name: Ari Cerealkillers Child Theme
Description: Minor modifications to Ari
Author: Stephen Willey
Author URI: http://cerealkillers.co.uk/about
Version: 0.1
Template: ari
*/
 
@import url("../ari/style.css");
 
ul.really_simple_twitter_widget li {
	padding-bottom:5px;
	border-bottom:1px dotted #CCCCCC;
	margin-bottom:5px;
}
 
ul.really_simple_twitter_widget li:last-of-type {
	padding-bottom:0px;
	border:none;
	margin-bottom:0px;
}
 
.widget_sociallinks { width:100px; }
ul.sidebar li.widget_sociallinks { float:left }
 
ul.sidebar li.widget_sociallinks a.lfp {
	background:url(images/lfp-icon.png) 0 0 no-repeat;
}
 
.wp_syntax { border:none !important; }

You can see that all I’ve done is add some styling to the ‘Latest Tweets’ widget on the right, and set a fixed width for the social links on the left (it helps them appear in a nice grid on mobile devices). If elmastudio (whose themes are fantastic) publish a change, I can just update through the admin interface and all should be well.

Child themes. Use ’em. They’re great. Find more info on the codex here