Home › Forums › General Issues › Cannot display a ACF in Traveler theme › Reply To: Cannot display a ACF in Traveler theme
Hi @leramulina
I’m sorry.
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: get_field('fieldname', $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!
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.