When Not to Do It Yourself (Custom Post Types)

When Not to Do It Yourself (Custom Post Types)

You know I’m a huge fan of creating custom content and post types in WordPress. I think they can extend your site in amazing ways. And a lot of times, if you have the technical chops to do it, I think it can be best to build your own from the ground up, instead of using someone else’s [potentially overloaded] plugin.

However.

A member of our local meetup group asked this question recently:

Ok guys, I have a question. I know that there are several E-commerce or storefront widgets for WordPress (Shopify, Woo-Commerce, Ecwid, etc.). I just read one of Robin’s posts on her blog about Custom Post Types and how they could help a crafty person selling their wares (like me). What would make it more beneficial to use one of these E-commerce widgets as opposed to just displaying my products in a custom post type page and just adding a PayPal button? I mean, customers could purchase either way, right? PayPal still gives the option for them to use either their PayPal account or a credit card and they wouldn’t have to go through another party like Shopify. Can you tell me the pros and cons on each of these methods? Thanks in advance!

In my mind, this illustrates a perfect example of when not to do it yourself. Plugins and solutions for ecommerce handle so very much more than simply creating a custom post type–they put together some pretty sweet shopping cart functionality, usually bring in reports, handle payments smoothly, and a lot of other things which can get pretty complicated pretty quickly.

Sure, PayPal lets you generate buttons for products, but imagine having to do that in PayPal each and every time you add a new product. Or what if you want to change the price of the product? Or run a sale? Or a customer wants to buy more than one thing from you? These are just a few questions which occur to me and I’m sure there are more. Opting to use someone else’s plugin, in this case, is probably the smart approach.

My sister-in-law is an author, and has been self publishing books for a few years, selling them through sites like Amazon. That’s worked well for her, but she would like to look into setting up her own online shop, maybe in a year or so, and selling her books directly. In the meantime, she still needs to be able to showcase the current books, and offer easy ways to get to the third party sites to buy them. In the past, we’ve done this all by hand, adding a new page for each book, and she crafts the links individually, but honestly, it’s a clunky and painful solution, and won’t help her transition to a storefront.

Someone Else Has Done the Hard Work for Me

Enter Easy Digital Downloads. This is a really great plugin designed for selling digital files. I’ve seen quite a few people use it for selling themes and plugins, but it can be used for selling anything digital. So I felt like it would be a perfect solution for Rabia, but I didn’t think she would be excited about seeing “downloads” everywhere, including links. Wouldn’t it be great if she would see words like “Books” and “Series” or “Works” instead? I knew that there was a lot of functionality in Easy Digital Downloads which I could not hope to build myself, but surely I could harness its power?

It turns out that I can, and this is actually really exciting. Pippin, the Easy Digital Downloads creator, has peppered his work with filters, so that anyone can modify the bits they want without adversely affection the plugin functionality. I set out to make Easy Digital Downloads an author-friendly solution, and it was a surprisingly smooth process. My goals were:

  • to make setting up a storefront as painless as possible
  • to use EDD to showcase all the current books, but not purchase directly (yet).
  • to customize labels and links to say “Works” instead of “Downloads”.
  • to have easy to add buttons for Amazon, Barnes & Noble, Smashwords, and Kobo.
  • to make sure all covers show the same way, same place, every time, without making the author do this herself.
  • to have a custom archive layout as a grid, and a custom single page layout, with the cover and third party buttons.

Easy Digital Downloads itself took care of the first two, no problem. PayPal integration is included up front, and there are addons for other gateways. On each product/download/book page, there is an easy checkbox to disable the purchase button. For the third, customizing labels, etc., I was able to use a handful of filters to change “Downloads” to “Works”, and the same for links.

Creating the third party buttons was a little more work. I decided to utilize the functionality of another plugin, CMB2. I could have used Advanced Custom Fields, and it would be easy enough to implement, but I chose the former for this project.

For the last two: I added a new image size which matched the standard cover image, and added it in as needed to my templates. All the author needs to do is set the cover as the featured image. I was able to set up the templates pretty easily, partly because I work exclusively with the Genesis Framework (affiliate link), so all I needed to do was reconfigure the existing output.

This was fairly easy to implement, and I thought it might be useful for others, plus it showcases some of the awesome versatility of Easy Digital Downloads, so I’ve made the plugin, EDD Author, publicly available on Github. Here’s some screenshots of the plugin in action, or you can visit Rabia’s site to see it (no onsite purchasing at this time):

So this is a nice example of when it’s best not to build something out yourself. A solution already existed which accomplished everything I wanted, just with some modifications. I’m a fan of working smarter when I can, so this suited me nicely. If you have a similar use case–a product which can be sold digitally, but isn’t exactly a download–customizing a plugin like Easy Digital Downloads is a great option.

Do something awesome. Tell a friend:

subscribe by email

If you're an email kind of person, that's totally cool. Go ahead and sign up here to get the latest blog entries in your inbox! No worries, I never share your address.
  • This field is for validation purposes and should be left unchanged.

Reader Interactions

Comments

  1. June 24, 2015

    Great article, thanks. I’m using genesis myself and now wonder if your functionality isn’t more advanced than the new author pro theme plugin. Perhaps studiopress could use it. For myself I have choosen WooCommerce on a website that had digital products and live services (events and live coaching sessions) because of the integration and the ability of using a gateway to iDeal (most used gateway in Holland) and MisterCash (used in Belgium). As I read you correctly the plugin you choose only support digital downloads, but no virtual products that are not downloads, and no physical products? Would that sollution still stand if the business expands and the products are no longer just digital products, and would you then add other plugins for instance for memberships or events? Or would u then switch to a more integrated plugin? In the branche of the businesses I support, the products tend to allways be more than just digital downloads. Normally it would be downloads and online courses and live events and appointments, but it could also be some physical products.

    • June 28, 2015

      EDD Author can be used to support anything that Easy Digital Downloads can do. Honestly, my experience with EDD proper is still fairly limited, but I’ve seen extensions for handling physical products in addition to digital. I’m not sure if/how it could be adjusted to handle event tickets/booking, but I suppose someone has tried it. I feel like the adjustments I made to it are relatively minor, and certainly do not use EDD to its full potential.

  2. July 9, 2016

    Great writeup. I like the design very much and am going to borrow some of this for my site. I had such a time customizing the single-download.php on my site…for the life of me couldn’t figure out why it wasn’t taking the changes I was making.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Bars Code Check chevron-down chevron-left chevron-right chevron-up Envelope Laptop Search Times Facebook GitHub Google Plus Instagram LinkedIn Pinterest Twitter WordPress Logo Wordpress Simple