Some of you may recall my earlier post Adding JavaScript to WordPress Posts without a Plugin. In that post, I talked about how to add JavaScript for, say, embedding a video without having WordPress “sanitize” your code… and without any plugins!
WordPress MU, the version of WordPress that allows multiple blogs to be run under one WP installation, uses a different content sanitizer. In fact, it’s so seriously anal that it blows away not only JavaScript, but all kinds of other HTML tags in your posts that the regular WP leaves untouched! Bad juju.
In the case of WP MU, the best solution that I could find does include a plugin – but you can write it yourself in about 10 seconds. In writing the plugin yourself, you will also know how to maintain it yourself. Even if you don’t know much about PHP, this one’s a piece of cake!
So, here’s how to convince WordPress MU to play nice with the HTML in your posts…
Read more…
Scottie Programming javascript, php, plugin, wordpress
If you have installed your own WordPress blog on your server, you may want to include some JavaScript goodness from time to time.
The bad news is that WordPress likes to screw around with tags when using the WYSIWYG post editor. That makes it kind of hard to, say, embed a video in one of your posts.
The good news is that there is a very easy way to embed any kind of JavaScript in your posts without the need to install any plugins, or change any configuration settings. And it works beautifully with the WYSIWYG editor…
Read more…
Scottie Programming javascript, wordpress
Everyone loves WordPress – especially when it comes time to upgrade to the latest version of a plugin or of WordPress itself. You just click a button, and it does all the work.
Those of you who are used to doing things “The Joomla Way” can no doubt testify to the glory that is WordPress.
Sometimes, you can’t automatically update WordPress itself. In such cases, you need to manually install the newer version. Normally, you delete most of your old WordPress files (be sure to read the manual update instructions!), and then simply upload and uncompress the new version in your application’s directory. Voila! Everything just works…
Well, most of the time. Sometimes, it doesn’t. Sometimes, you are dumped back to the initial WordPress setup screen. If you fill in the fields and carry on with the install, it will look like you have just destroyed your entire old WordPress site when you are greeted with a default, empty home page.
Fortunately, you haven’t destroyed anything! Here’s how to get your site back in just 3 steps…
Read more…
Scottie Do-It-Yourself, Programming upgrade, wordpress
WordPress is a seriously popular blogging platform, primarily because it simply rocks. In fact, this here blog uses WordPress.
Since I generally write posts about programming issues, I needed a good plugin for automagically highlighting code segments. I ended up choosing SyntaxHighlighter by Viper007Bond.
While it generally kicks butt, there is one little bug that is particularly annoying for those of us who post snippets of Ruby code: including a variable in a string like 'this is a #{color} string' causes SyntaxHighlighter to make everything after the “#” into a comment, which it wraps down to the following line.
That simply won’t do…
Read more…
Scottie Programming javascript, ruby, wordpress
Recent Comments