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 WordPress Theme Development Custom Post Type Templates in WordPress The Portfolio Single Page

Jessica DiPonziano
seal-mask
.a{fill-rule:evenodd;}techdegree
Jessica DiPonziano
Full Stack JavaScript Techdegree Student 20,782 Points

Custom field is deleting the description input, why?

I created the custom field like in the video, the images work fine, but for some reason when I type in the description box and click save, the description is deleted. How can I fix this?

2 Answers

Jessica DiPonziano
seal-mask
.a{fill-rule:evenodd;}techdegree
Jessica DiPonziano
Full Stack JavaScript Techdegree Student 20,782 Points

I changed the field name from description to details and everything worked. I guess the field 'description' is conflicting with another field probably named description somewhere else in the site.

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

If this is what I think you're saying then what's happening is the information you type into the description is being saved into the database but the "support" for the custom field is checked out.

To check for this go to your CPT-UI plugin in the admin area and select Add/Edit Post Types. You should see the post type slug visialbe in the list, select this then head down to the part of the page headed "support". Check that "description" has a tick next to it.

I hope I understood you right and this has helped :)

Jessica DiPonziano
seal-mask
.a{fill-rule:evenodd;}techdegree
Jessica DiPonziano
Full Stack JavaScript Techdegree Student 20,782 Points

Thank you for the response Jonathan but I already have all the proper supports checked. I saw that suggestion in other questions. My problem is when I type in the description field on the portfolio piece and click publish, everything I put in the description box just disappears and doesn't publish or save it anywhere. Is so strange.