Tagtips

How to: Disable Jetpack Subscriptions Notifications

It’s more difficult to keep this in mind, than it is to actually execute it. Sometimes we (content creators) want to publish content to see how it feeds to our Twitter or Facebook accounts, or to see how it turns up in the RSS feed, so what we usually do is publish a “test” post and delete it afterwards (together with the tweet and Facebook post.) However, sent e-mails cannot be...

Changing the Default Theme in WordPress Multisite

It’s important for a network (WordPress Multisite) to have a valid default theme for newly created sites. The current version sets this to twentyeleven in default-constants.php. If your default theme isn’t installed or disabled network-wide, you might face some errors when creating new sites in the network. You can define WP_DEFAULT_THEME in your wp-config.php file.

Tip: esc_url versus esc_url_raw

This tweet gained some good attention on Twitter, so I thought it would be good to explain why. Then I found a support forums thread where Mark Jaquith pretty much explains it all: esc_url() is for something like <a href="SANITIZE_THIS">text</a> So if you’re going to use the URL in your HTML output, like a href attribute for a link, or a src attribute for an image element, you...

Daniel Bachhuber: The Zen of WordPress Development

Daniel Bachhuber of Automattic’s WordPress.com VIP team, gave this awesome talk at WordCamp Phoenix 2012 earlier this year. He walked through some things developers are overlooking when working with WordPress, and some great tips and tricks to speed up your development workflow. One thing I learned from that talk is that I should stop using Textmate’s “search in project”...

Native Image Sizing “On the Fly” with WordPress

I tweeted it out not too long ago, and it seems to have gotten people’s attention. So why do WordPress theme developers still use TimThumb? One of the valid reasons seems to be dynamic image sizing. Of course if you’re using TimThumb for post thumbnails in your theme, your life saver is the add_image_size function — you don’t need “dynamic resizing” since all...

Dear WordPress Theme Developers, Stop Using TimThumb

Just a reminder, since this weekend I had to help out with yet another TimThumb-powered WordPress theme, broken by a “security patch” at the web hosting provider. This time it was Acquisto by Press75. The problems of Acquisto are not limited to thumbnails.

Using Jetpack for E-mail Subscriptions in WordPress

You can find a bunch of “subscribe to posts” plugins in the WordPress.org directory but from my personal experience, it’s very difficult to find something as good and reliable as Jetpack. The major difference is behind the scenes — when most post subscription plugins will use the wp_mail function to distribute your new post (using sendmail from your server or an SMTP...

A Note About get_template_part and Child Themes

Tip: if you’re wondering why your WordPress template file (for example index.php) is not being executed, perhaps a different file (archive.php) is overriding it. Now this may sound obvious, but not when you start using get_template_part to organize your theme files, and not when you’re making a child theme. Let’s take a quick look at the following snippet: get_template_part(...

Sync Time and Date in Ubuntu Linux

Quick tip! If you’re using virtual machines to develop and test your web applications, you probably use the “save state/snapshot” feature instead of turning it off and on every time. I noticed after a while that my time was out of sync (a few weeks late) which caused a bunch of problems. Luckily, I found this simple command: sudo ntpdate ntp.ubuntu.com It will sync your time...

WordPress Multisite with Wildcard Subdomains

If you’re working with WordPress Multisite in your local environment, you might have noticed that dealing with a subdomain install is a pain, because your hosts file doesn’t support wildcard entries for hosts, i.e. you cannot do something like this: 127.0.0.1 *.multisite.lo # will not work! There are quite a few solutions though, first and easiest of which is to run multisite with a...