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 trialFlorian Brunner
10,240 PointsCustom Post Types displayed in "normal" blog
I would like to creat Blog posts with custom fields - so for instance I want to display events which need custom fields like date, place, desciption. The style should be exactly the same as the normal blog posts, but with those 2 or 3 additional textfields. But I want those events displayed together with all the "normal" Blog posts, which do not need that extra content. Is that possible?
Or is it easier to simply set up Templates with visual editor and edit them all the time?
thanks in advance & greetings
2 Answers
scottwienke
15,868 PointsHi Florian,
I am trying to grasp what you are asking for, but let me give this a shot ...
So what you want is the blog posts to be listed, what you would need to do is write a conditional telling wordpress that if your blog post is an event, then display those extra fields, if not display the normal blog posts. Easier done in a custom template, then using visual editor.
Hopefully that helps you get in the right direction!
Scott
Florian Brunner
10,240 PointsHey Scott, thanks alot for your answer! It's almost what I wanted to know ;) Let me try to be a little bit more precise: Is it possible to add additional (custom) fields to a blog post, when I choose a specific custom post format? Or is taht only possible with post types? Thanks & greetings, Flo