Will this work to license a WordPress theme I developed?

Yes. Works exactly the same way as licensing a plugin.