Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Is the all of the WordPress theme in the Theme folder

Hello

I have been watching the new WordPress theme development videos which are really good. I have a question though, if i create a theme in the manner described and then say I want to move the theme or sell it, is it a case of just needing the theme folder, and if so what happens to the custom fields as I thought they are stored in the database?

All help is appreciated.

Naz

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

This is actually a bit trickier point that we wouldn't cover until a more advanced series.

From a best practice perspective, you shouldn't build custom posts and fields into your themes. If a user changes their theme then they loose access to their custom post types in the admin area, although the data still exists in the database.

You can technically have a theme require the user to install (or you possibly automatically install with the theme) a plugin and setup the content yourself from the theme functions.php if it doesn't already exist.