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 trialMartin Rheaume
4,831 PointsBuilding a Wordpress Theme: problems with custom post type & field
I have a problem on the last tutorial of the first stage of the Wordpress theme building project. I added the two plug-ins (custom post type UI & Custom Fileds). Everything seemed to be working fine, but when I publish, none of my content shows up. On the back-end, I can edit my custom post type just fine, but when I press publish, none of the custom content gets published.
8 Answers
Zac Gordon
Treehouse Guest TeacherHey Martin!
What does your template code look like? Specifically the work.php page?
Martin Rheaume
4,831 PointsI don't see a work.php, Zac. I'm using Responsive Theme. I'm looking in the appearence >>> editor area.
Martin Rheaume
4,831 Pointsoops, actually that's a different project. I'm experimenting with custom post types on the localhost, and I'm using 2012, but I still don't see a work.php in the editor.
Zac Gordon
Treehouse Guest TeacherOkay, I misunderstood the project you were working on with the work.php file. Default WordPress sites usually need a custom template setup to display custom fields.
Are you familiar with doing this?
Martin Rheaume
4,831 PointsNo I'm not. I'm following this tutorial http://blog.teamtreehouse.com/create-your-first-wordpress-custom-post-type from the Treehouse Blog. It doesn't mention anything about custom templates.
Zac Gordon
Treehouse Guest TeacherYeah, that's interesting. It looks like everything here is just showing how to set things up on the backend of the site, but not display them on the front end.
We have a new set of videos coming out next week that explains exactly how to do this, but I'm going to write up a blog post in the next day that goes through this step by step. It's how the web works, but that article isn't even a year old and already needs updating ;)
I'll ping you as soon as it's up. I started to explain it in a forum post, but it's a little in depth ;p
Martin Rheaume
4,831 PointsSorry for confusing you Zac (it was I who was confused). I posted two different forum topics about custom post types. One on your video and the other on the tutorial that I mentioned. Now that I'm back on track I look forward to your blog and the new video. One thing I did notice is that they seem to have stopped updating the custom post type ui plugin which we're using for this tutorial.
Zac Gordon
Treehouse Guest TeacherHaha :p Great!