Building WordPress themes to sell

The very reason I created this site was so that I could document and kind of bookmark sites like this one.

WordPress is a great CMS these days and with it being the most used CMS on the web, it’s no wonder that people intend on making money from their themes. So if you build WordPress sites for clients, it may be worth thinking about adapting that and creating one to sell by following this great guide on Smashing Magazine.

Building WordPress Themes You Can Sell

WordPress custom meta boxes that empty on autosave? Here’s the solution

I’ve had this problem since I first delved into the crazy world of custom post types in WordPress. Every time I would create a custom post type with its own custom meta fields like for example a Movies custom post type with custom fields of year and director, something along those lines. I’d fill out the main body of text for the page and then fill out the custom fields, which worked fine when I saved and previewed it. However I noticed that if I left my WordPress editing screen open after a little while the custom meta fields would empty themselves, and only the main body of text in the editor would remain.

I figured this had something to do with the auto save in WordPress and did a little research, it turns out that this little snippet of code can save your day.

if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;

I’m not entirely sure how this code works but I figure it asks WordPress if it’s auto saving, to kindly run the save function as well, which it does.

So a custom field save function in your functions.php would look something like this originally.

function save_domain(){
global $post;
update_post_meta($post->ID, "domain", $_POST["domain"]);
}

Would become something like…

function save_domain(){
global $post;
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
update_post_meta($post->ID, "domain", $_POST["domain"]);
}

And hey presto, no more disappearing custom fields. Hopefully this helps :)

Google Drive to rival Dropbox?

I found this interesting article today. It’s a nice and short one but apparently Google Drive is very real and expecting to roll out before the years end. With dirt cheap yearly prices for storage extentions, it’s looking like it’ll be a real competitor for Dropbox.

Google Drive Coming Soon

The quality of your WordPress theme code

An interesting article I found here about the quality of WordPress theme code. Essentially I was looking into making my WordPress theme code better so that I could start selling themes on ThemeForest. I came across this article which goes into incredible depth about guidelines to follow, plugins to install to help you make your theme as perfect as possible. It isn’t for people who want to quickly make a theme however as it does go into some real detail and could take some time to fully go through and understand.

That said, it’s worth reading simply because if you go through the lot and start understanding the depth of theme development it goes into you’ll definitely benefit being able to create themes to sell and make some money. Who said learning was dull?

http://themeshaper.com/2011/09/13/your-themes-code-matters-too/

Pattern Trail. A useful repeatable background resource.

Here’s yet another site that provides loads of quality repeatable background images. Not much else to say really except if you’re after a decent background image it’s worth a look at.

Pattern Trail