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

Konrad Pilch
Konrad Pilch
2,435 Points

How can i make ACF add HTML?

HI,

How can i add HTML with Advanced Custome Fiels? so what i mean is that i have tabs e.g. Web Design, Web Devloper and if the user adds another, it will add another tab, Web Marketing so now theres more in the HTML basically .

With a loop? is there any other way ? i remember frmo somehwere the guy was doing it differently i think.

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Yes, you will need to add the necessary HTML inside of your template using a loop that loops through the available fields and creates a tab for each one. You can also use conditional statements to see if a field is not empty and create a tab for it if it has content.

Konrad Pilch
Konrad Pilch
2,435 Points

Ah right! Now it ticks, conditional statements that what i was looking . Thank you!

Kevin Korte
Kevin Korte
28,149 Points

Probably a loop, what field type would you use?