Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Roberto Cabrera
Roberto Cabrera
1,149 Points

This video advise to use two plugins, advance custom fields, and custom post type ui. Why?

what about if the user who downloads my theme do not have those 2 plugins? Will my theme fail?

1 Answer

This is a great question. I think it would be really helpful to have the theme development course focused on being able to package a theme for distribution (which is probably want more aspiring developers want to be able to do, rather than just modify a theme for single use).

The solution I am looking at is programmatically creating the custom post types (and meta fields) and putting it in a simple plugin. Then I'll use TMG Plugin Activation: http://wptavern.com/tgm-plugin-activation-library-publishes-roadmap-for-version-3-0 to require plugins for install with the theme.

From what I can tell, this is best practice - including custom post types in the theme is bad practice and will cause it to be rejected from most theme shops (like ThemeForest), but the method outlined in the current Treehouse course content does not seem suitable for distributing themes - we don't want to have end-users download two additional plugins and configure.