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 trialNijad Kifayeh
6,092 PointsAlternative to using widgets
As an alternative to using widgets to code and easily edit the 3 subheading sections, can't we create a custom post type and custom post parts to achieve the same result?
Which method is preferable?
1 Answer
Tim Knight
28,888 PointsNijad,
I would say that it comes down to flexibility. You can absolutely do a custom post type. That would let you let the fields and content that are added within those areas. There widget areas can help though is if you don't have a solid plan as to the content that will necessarily need to be added to that space or if you or you client need for that are to be open for changes. Using widget areas allows you to be able to drag and drop multiple widgets into one widget area. So in my opinion it's really just about flexibility.
Nijad Kifayeh
6,092 PointsNijad Kifayeh
6,092 PointsThanks! I would like to add as well that search functionality does not apply to widgets, so if someone needs the widget content to be searched they should opt for the custom post types method.