Home › Forums › General Issues › How to fetch custom field value in index.php? › Reply To: How to fetch custom field value in index.php?
Elliot answered a similar question here. In order to call a field while on index.php, you need to add the page_ID like this: <?php the_field('page_intro_text', 15); ?>
where the number ’15’ is the value of page_ID for the page that has the field 'page_intro_text'
.
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.