Figured it out. When you initially setup your ACF options is defaults autoload to false. If you set it to true they will then show up.
Running a few tests now but I will for sure! Thanks again!
I didn’t even know wp_load_alloptions
was a thing! That is awesome!
Hi @markbloomfield,
The reason I am not using get_field('fieldname');
is due to the amount of custom fields I am using. I do not want to use a DB every time I need to display the field. Using get_post_meta($post->ID);
allows to me to only call the data once.
Shoot side note: I don’t have the Checkbox in there right now. I moved to a select as I had that working.
I apologize if the code is terrible. First time really going at something like this 🙂
https://gist.github.com/rameden/ea3d6d7bea4443713f6c8d1062644366
I appreciate the help. I’ll keep digging.
I am using function render_field_settings
but because I have multiple fields (I only posted for ease of reading) I am wrapping each field in acf_render_field_wrap
. I saw this done a few time in other people projects and figured it was the right way :D.
You are right in the fact that I probably want a true false as I do only have a Yes option. How would I go about adding the true false to my template?
Custom setting on a field.
Solved this by using keys. Thanks!
I have updated it to use keys and that seems to work perfectly! Thanks a bunch!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.