Home › Forums › General Issues › Cannot display a ACF in Traveler theme › Reply To: Cannot display a ACF in Traveler theme
We can’t provide help for specific themes. It’s better you contact the theme developers for that.
What I can tell you is that there’s two things you need to fullfil for
get_field() to work:
1. You need to put it in the right template.
2. It needs to be inside the loop: https://codex.wordpress.org/The_Loop
There’s an exception to this. You can display the values from one post anywhere by setting the second parameter of
get_field() which in the case of posts/pages would be the post ID:
There are a bit more to it as well if you display values from something other than a post but you can find all that information in the documentation.
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!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.