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

Using the checkbox field in wordpress theme (ACF plugin)

Hi, Greetings Zac Gordon

I have a question about something. During wordpress custom themes, had a field created with the plugin Advanced Custom Fields of type checkbox, I think it will not use that type of field.

You could explain an example of use?

I would like to apply a css class to a certain element that is enabled or disabled from the backend.

To finish and close my idea, as you can use the check box field with ACF plugin?

I forgot, the use of taxonomies, such as using taxonomies ... Thanks

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi, there are a lot of things you could use a checkbox field for as a custom post type: anything that you want set as true false, maybe interests, preferences to certain settings or questions, etc.

You can check to see if the custom field is set to Yes and then run your conditional code. Check out this forum post: https://teamtreehouse.com/forum/how-to-build-a-wordpress-theme-no-code-covered-for-the-displayonhomepage-checkbox-in-the-frontpagephp-slider-loop

--

What is question about taxonomies?

Hello Zac Gordon and thanks for your answer, I can now continue my projects, I really had trouble finding the solution, but in the link you show is the problem solved soon I will be analyzing.

On taxonomies, it was just a suggestion for future courses and some workshop, sorry for having included in another topic, I researched on my own and something I could make reading the codex and using the plugin.

Thanks zac great course, I learned a lot ...