Mark on WordPress

WordPress puts food on my table.

Public response to Chris Anderson’s “Free” on WordPress

with 36 comments

I got a tip that Chris Anderson’s upcoming book Free has the following to say about WordPress:

2. Feature limited (Basic version free, more sophisticated version paid. This is the WordPress model.)

  • Upside: Best way to maximize reach. When customers convert to paid, they’re doing it for the right reason (they understand the value of what they’re paying for) and are likely to be more loyal and less price sensitive.
  • Downside: Need to create two versions of the product. If you put too many features in the free version, not enough people will convert. If you put too few, not enough will use it long enough to convert.

This is most assuredly not the WordPress model. Anyone and everyone can go to wordpress.org and download a completely free, completely unrestricted, and completely feature-complete version of WordPress to run for any purpose. There is no feature limited version of WordPress.

Chris might be getting confused by WordPress.com, which is a hosted WordPress solution (the biggest one, but certainly not the only one). It is true that WordPress.com charges money for certain features, such as CSS editing capabilities. But this is completely within the rights of Automattic, the company which operates the WordPress.com service. That one company is charging for certain aspects of a hosted WordPress solution does not change the fact that WordPress itself is free/open source software and has no monetization model and no tiered versioning system.

As we talked about at SXSW, Chris, it is WordPress services that are the “freemium” portion of WordPress. We give the software away, and thus create a vibrant market for third party WordPress services (this marketplace, to quote this blog’s quite literal catchphrase, puts food on my table).

Note that it would be correct to say that this is the Movable Type model, whereby Movable Type Pro and Movable Type Enterprise get features not available in the free/open source version of Movable Type.

Written by Mark Jaquith

June 20, 2009 at 1:27 am

Posted in wordpress

Tagged with , , ,

Escaping API updates for WordPress 2.8

with 19 comments

The WordPress escaping API functions have been updated. Escaping is a way of using untrusted text that “neuters” anything that could do damage. Escaping is used in WordPress to avoid SQL injection and cross-site scripting/script injection (XSS), among other things.

The old functions still work, so if you were using the old ones, you’re fine. The new ones just offer you an easier to remember, more concise, and more flexible way of securing your WordPress code.

Here’s an example. Say you wanted to translate a string, escape it for use in a quoted HTML attribute, and then echo it out. In WP 2.7, you’d have to do this:

<?php echo attribute_escape( __( 'Untranslated text' ) ); ?>

In WordPress 2.8, you can just do this:

<?php esc_attr_e( 'Untranslated text' ); ?>

Shorter, plus we killed the echo and the extra pair of parenthesis! But let’s break it down.

esc_ = 1, attr = 2, _e = 3

  1. esc_ is the prefix for the new WP escaping functions.
  2. attr is the context (in this case, attribute). The available contexts for 2.8 are attr, html, js, sql, url, and url_raw.
  3. _e is the optional translation suffix. The available suffixes for 2.8 are __, and _e. If you omit the suffix, no translation is performed, and your string is just returned.

More about contexts

  • attr means an HTML attribute.
  • html means text within an HTML node, but not within an attribute
  • sql is an alias to $wpdb->escape().
  • url means URLs for use in HTML attributes.
  • url_raw means URLs for use in redirects or storage in the database (does not entity-encode).
  • js means JS, for using PHP to populate a Javascript var.

More about suffixes

Suffixes work just like the function they’re named after.

  • __ translates the string and returns it.
  • _e translates the string and echoes it.
  • The suffix is optional. A blank suffix will just return.
  • Suffixes are currently only available for html and attr contexts.

Functions with translation suffixes also accept an option second parameter of a translation domain, for use in plugins.

Enjoy! Go forth and write more succinct code.

Written by Mark Jaquith

June 12, 2009 at 12:25 am

Posted in wordpress

Tagged with , , , ,

8 steps to get started as a freelance WordPress developer

with 36 comments

I’ve had a bunch of people ask me how they could get started as a WordPress developer or consultant. Rather than answer them all individually and privately, I’m putting it up for all to see.

Become involved with the development community

Join the wp-hackers mailing list. Participate when you have something useful to say, or an interesting question/problem to pose to other WP developers. Dive in at the WP support forums. Find someone with an interesting problem, and solve it for them. If it’s a notable issue, write a blog post about how to solve the issue. Which brings me to the next task…

Blog about WordPress

I’m doing this right now! Not only is it deliciously “meta,” it can raise your profile and help you connect with other WordPress developers and users. Write about a problem you solved, or a challenge you’d like to see addressed by WordPress core or a WordPress plugin. And don’t forget to blog about the plugins you write…

Write a bunch of useful plugins

This is probably the best thing you can do to get noticed by clients. Write a useful plugin and you’ll be getting business leads for years to come. You don’t have to write a really big, complicated plugin. Write something that will make using WordPress easier, more fun, more efficient, and people will remember you. It might be good to have one more ambitious plugin to serve as an example of your skills, but certainly don’t shy away from brevity. Some of the favorite things I’ve written are between 1 and 50 lines of code. Users don’t care about how big a plugin is. They just want it to serve a need. Go ahead and scratch their itch. Hint: monitor Google or Twitter for people saying “I want a WordPress plugin…” to get an idea of the sorts of needs that are currently unfulfilled.

Contribute to WordPress core

Contributing to the WordPress core software helps you in two ways. First, it provides continuing education. WordPress is constantly evolving, and you need to stay sharp! This is a great way to learn about (and influence) the direction of the WordPress codebase. Second, it raises your profile in the WordPress community (both the developer and user communities). Be sure to blog about your WordPress core contributions. Trac is a great place to start. Maintain a calm demeanor, and don’t get too big for your britches. Don’t be the person who comes in and embarrasses themselves by closing a ticket as “WONTFIX” that was opened by a seasoned developer! Watch how other tickets evolve and you’ll figure out how it works.

Stay in contact with more seasoned developers

A lot of us are busy, but we try to make time to mentor people. We’re all well-served by a vibrant development marketplace. Don’t be afraid to contact a more experienced developer for advice. The worst that will happen is that you’ll get ignored — apologies to anyone who is in my e-mail limbo… resend it if it’s been more than a few weeks!

And as you get more experienced:

Speak at WordCamps and other events

Once you’ve gained enough kudos in the WP community, you’ll likely be asked to talk at a WordCamp event. And if you haven’t, and you think you could bring something special to the event, go ahead and ask if they need any more speakers! This will raise your profile further, introduce you to really cool people, and provide you with a bunch of business leads. BarCamps, social media gatherings, and other such events are also worth attending. The point isn’t to get up there and give a business pitch. In fact, your life might be in danger if you pull that stunt at a BarCamp. The point is to impart knowledge, connect with people, while letting your skills expose themselves naturally. And pitch away when you’re chatting up potential leads between sessions.

Charge according to your skill set and experience

Several years ago, I had the quasi-embarrassing surprise of being given a voluntary 75% per-hour raise by a client. I think they were afraid that my skills had outpaced my rate, and that I was going to get wooed away by a new client at a higher rate. Don’t make the mistake of charging too little. In fact, publish higher rates than you actually think you’re worth, and allow people to haggle you down (a little). And every time you get booked up and have to turn away business, raise your rate. If you’re in that much demand, you’re not charging enough.

Find a niche

But not WordPress security. That’s mine. :-)

A WordPress development niche is a niche within a niche. And that means you can charge more for your more specialized skills. Examples: migrating data to WordPress. Feed kung-fu. Re-implementing a design from another system. Custom write-panel plugins. Sidebar widgets.

Written by Mark Jaquith

June 6, 2009 at 11:57 pm

Posted in wordpress

GigaOM Pro launches on WordPress and BuddyPress

with 19 comments

2009 is the year of BuddyPress. It’s also the year where online content providers have to figure out how to make money outside of the flailing “get a lot of views, sell ads” model. For the past couple of months, I’ve been working on a project that tackles both of those things, and I’m really proud to present it to the world:

GigaOM Pro is a WordPress/BuddyPress-powered premium research membership site, focused on four initial verticals: Mobile, Green IT, Infrastructure, and the Connected Consumer. A network of independent analysts provide in-depth research papers and research notes, which subscribers can view on the site or download as PDF documents. GigaOM Network contributors provide “long view” posts — topic-focused long form posts. And each of the topic verticals has a curator who provides weekly updates on the topic, as well as a constant stream of curated links to relevant external stories. Subscribers can access all the content, comment on the content, have a profile on the site, and send messages to Analysts, Contributors, Curators, or other subscribers using the BuddyPress messaging system.

Here’s what it looks like:

GigaOM Pro home page

GigaOM Pro home page

The content is incredibly compelling. I’ve been especially impressed with the quality of the Long View posts. More than once when developing the site I would get distracted by one of these pieces and have to read the whole thing. The GigaOM writing staff and the analyst network are very talented people, and I think that $79 a year is a steal for this calibre of hyper-focused content and this sort of access to industry analysts.

From a technical perspective, it was interesting to create a site with such distinct content types. The Write screen for Curated Links looks nothing like the Write screen for Weekly Updates, or Research Briefs. The system makes heavy use of the category system, and custom WP_Query objects and loops. category__not_in, category__and and post__not_in are very powerful tools for getting the correct entries from the system.

Naturally, there are no core WordPress hacks — everything is implemented through plugins and the custom theme!

Let me know what you think. And don’t subscribe — I put in a lowball prediction in the internal betting pool for how many subscribers there are in the first week, and I think I’m going to lose. :-)

Written by Mark Jaquith

May 28, 2009 at 6:58 pm

State of the Word – WordCamp Mid-Atlantic

with 8 comments

Here are my slides from the State of the Word keynote at WordCamp Mid-Atlantic:

Written by Mark Jaquith

May 17, 2009 at 6:30 am

Posted in wordpress

Tagged with , , ,

Force CSS changes to “go live” immediately

with 41 comments

If you update your WordPress theme’s style.css, you may have noticed that you have to “force-reload” your site in your browser to see the changes. This is because your browser keeps a copy of the CSS cached on your hard drive. Depending on how your server is set up, it may not check for a new version of the stylesheet for a couple hours, or longer! And even if you force-reload to see the changes, visitors who have previously accessed your site may still get the old CSS. One way to solve this is to “version” your CSS file, by adding ?v=123 to the URL in the <link /> to your stylesheet. This is rather a pain to have to do by hand every time, so here is a much better way:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />

This automatically updates the ?12345678 ending part every time you modify the file. Boom. Now everyone instantly sees your changes.

Written by Mark Jaquith

May 4, 2009 at 5:47 pm

Posted in wordpress

Typographica relaunches on WordPress

with 11 comments

Typographica, the excellent blog for typographical nerds, has just relaunched on WordPress with a great new design by Chris Hamamoto. Asked why they switched from Movable Type to WordPress, Stephen Coles replied:

For me, it seemed an obvious switch given WordPress’ wide adoption in recent years. We’ve often had trouble getting assistance with MT, whether it’s documentation or expert advice. Because WordPress is so common, the help resources and useful plugins are simply much more accessible.

WordPress’ killer features are its community and its marketplace: thousands of free plugins, thousands of free themes, and hundreds of agencies and freelancers providing every possible WordPress development and support service you can imagine.

Written by Mark Jaquith

April 24, 2009 at 3:07 am

Beta testers needed for Subscribe to Comments

with 19 comments

I have a new version of Subscribe to Comments that will be coming out soon. The storage system for the subscriptions is changing (or rather, being consolidated into one method, instead of being spread into two). The good news is that this new version has zero database schema changes from WordPress core. It also adds support for double opt-in subscriptions for compatibility with German law (and possibly others). Before I release this version, I’d like some other people to test it, especially to make sure that the transition of subscription storage method works smoothly.

What I need are two or three people who meet the following criteria:

  1. Current running WordPress 2.7 or 2.7.1
  2. Currently running Subscribe to Comments 2.1.2
  3. Have a large number of comment subscriptions (at least 500)
  4. Are able to make a SQL backup of their comments table prior to testing, and restore it in the event that something goes wrong

If you meet those criteria, send an e-mail to mark.stcbeta@txfx.net and I’ll get you hooked up.

Written by Mark Jaquith

April 11, 2009 at 2:10 am

WordPress iPhone Skin

with 24 comments

Check out the awesome WordPress skin that my iPhone is rocking.

 

WordPress skin for the iPhone 3G

WordPress skin for the iPhone 3G

It’s my understanding that these will eventually be available for sale in the WordPress Shop.

Written by Mark Jaquith

March 26, 2009 at 12:40 am

Posted in wordpress

Tagged with , ,

Heading to SXSW, WordPress consulting availability in mid-May

with 4 comments

Tomorrow I’m heading off to Austin, TX for the South by Southwest Interactive Festival. If you’re going to be there, and you’re a WordPress fan, make sure you say hi and let me know what cool uses you’ve found for WordPress! The best way to find out where I am or to get in contact with me is to follow me on Twitter. Ping me in an @message if you’d like to chat.

Also, if you have need of a WordPress guru, I’m back on the market! My contract with b5media has moved to a part-time arrangement, so if you’re looking for someone to figure out how WordPress and your company or product fit together, drop me a note or track me down while I’m in Austin. I have a really exciting secret project occupying my time until mid-May, but if you can wait a few months to start your project, we can start that conversation now.

Written by Mark Jaquith

March 12, 2009 at 3:27 pm

Posted in wordpress

Tagged with , , ,

BarCamp/WordCamp Miami

with 8 comments

BarCamp Miami

I’ll be in Miami on Sunday, February 22nd for BarCamp/WordCamp Miami. If you’re in the area or are in town for the Future of Web Apps conference, you should stop by!

What should I talk about?

Update: There has been a venue change for this event, so if you were planning on going, make sure you take note of the new location!

Written by Mark Jaquith

February 17, 2009 at 4:26 am

Posted in wordpress

Tagged with , , ,

Show all categories on the post editing screen

with 9 comments

Isn’t it annoying when you have a site with a reasonable number of categories, say 15, and WordPress only shows you the first 8 in the category checkbox widget? Ugh, scrolling is annoying.

Try this super-simple plugin. It’s so simple that the plugin’s content is embedded into that link (seriously). There, now you’ll never see a scrollbar in the category widget. You’re welcome!

(Requires WordPress 2.7… upgrade already!)

Updated to work with WordPress 2.8.

Written by Mark Jaquith

January 24, 2009 at 1:39 am

Posted in wordpress

Tagged with , , , ,

Tip for merging two WordPress blogs

with 43 comments

WordPress’ built-in export/import functionality makes it a snap to merge two blogs into one. You simply export from the blog you’re going to retire, import into the blog you’re going to keep, and then forward the old domain to the new one.

Here’s my tip: do not select an existing blog user to “own” the imported content! Instead, create a new temporary user just for that content. Here is why: the imported posts may need some manual cleanup, like integration into the new blog’s category structure, or adding/removing tags. By importing into a new author, you’re creating a way to view only the posts imported in that batch. Simply go to the Users → Edit screen and then click the number of posts next to the temporary import author. Boom, you’re looking at only the imported posts. Then, as you clean up their categories and tags using 2.7’s bulk edit or quick edit features, you can simultaneously reassign the posts to their proper author. Once there are no more posts for that temporary import author, delete that author, and you’re done!

Written by Mark Jaquith

January 14, 2009 at 12:34 am

Posted in wordpress

Tagged with , , , , ,

Subscribe to Comments plugin now on WordPress.com

with 32 comments

My popular Subscribe to Comments plugin has now been enabled on the millions of WordPress.com blogs! Subscribe to Comments puts a checkbox in your comments form that, if checked when leaving a comment, will e-mail that commenter all followup comments on that post.

Give it a try! It’s a really simple and easy way to stay involved with a comment thread and actually have a conversation, instead of making what I call “drive-by comments.” Remember that you can unsubscribe at any time.

For people with their own WordPress installs, I’ll have an update to the plugin out soon, and may follow that with another if Donncha gets me the changes made to the WordPress.com version and I think the general WordPress community would benefit from those changes.

Written by Mark Jaquith

January 9, 2009 at 2:19 pm

Posted in wordpress

What would you pay for a book on “Advanced WordPress” ?

with 72 comments

This post is for people who work with WordPress: themers, WordPress coders and consultants, and anyone who wants to do things more advanced than installing plugins with WordPress. If you’re not in this market, be on your way, this poll doesn’t apply to you!

If you’re still here… I’ve been considering writing a book on “Advanced WordPress.” The market in mind is all of the themers, coders, consultants, and intrepid blog tweakers who may know a bit of PHP (or a lot), and want to go beyond the basics with WordPress. There are a lot of books that cover WordPress basics, but not a lot aimed at more advanced uses of WordPress. A sample of the topics covered would be:

  • Plugins
  • Hooks
  • Advanced WordPress administration and automation
  • Themes
  • Advanced theme tricks

It would be part reference, part walkthrough.

If this book were available, and you are in the market described above, how much (if anything) would you be willing to pay for such a book?

Thanks for your participation!

Written by Mark Jaquith

December 31, 2008 at 12:35 am

Posted in wordpress