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 trialCristinel Laurentiu
1,821 PointsPortfolio Support
Why don't we code inside the theme to have the theme to support portfolio? I just want to give the theme to someone to reuse it...or if we want to build themes to sell it...we don't give theme with cpt ar advanced custom fields. Can someone direct me to a link on how to do that? Thank You!
3 Answers
Flor Antara
12,372 PointsHello Cristinel,
Unfortunately, there are things that just need to be extended in WordPress, and for that we use Plugins.
Advanced Custom Fields is a fantastic plugin. If you create your Theme using ACF Fields, and you need to distribute it, you can take a look at their License. Read more here: https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/
More interesting resources regarding your concern:
- ACF JSON to save your field configuration inside your Theme folder: https://www.advancedcustomfields.com/resources/local-json/ (this is perfect also for code versioning)
- You don't really need a plugin to register a CPT. You can create your own code and put in in your
functions.php
. This helps a lot: https://generatewp.com/post-type/ - Must-Use plugins: https://codex.wordpress.org/Must_Use_Plugins
Cristinel Laurentiu
1,821 PointsHi Flor, thanks for taking the time to answer my questions. I have seen themes which do not come with ACF plugin and have the portfolio custom post type included and in the same time I want to improve my skills. Thanks again! +
P.S. I think I love you for this link https://generatewp.com/post-type/ - great resource.
Flor Antara
12,372 PointsSure! I'm glad you found it useful. Keep it close! You'll use it a lot!