Home › Forums › General Issues › Adding a custom field to loop-index.php › Reply To: Adding a custom field to loop-index.php
ACF will work with any theme. The documentation is just general how to, like how to get a field. This can be used in any theme. You have to understand how the theme works and what the theme offers to know where and how to add code. ACf can be used anywhere that the WP functions get_post_meta() and get_option() can be used, which is nearly anywhere.
Yes, for the most part you want to use a child theme because if you make changes to a theme they will be overwritten when the theme is updated.
Some themes supply hooks for adding content to different places while others require that you copy a template to the child theme and then edit it.
I and others can guide you in the use of ACF but will not likely be able to help you with implementation in a specific theme.
I would suggest that you figure out how the theme works. Instead of trying to output an acf field simple try to add some text where you want it to appear, for example
echo 'this is a test';
once you have your test text appearing where and how you want it on the page then you can replace it with the value of a field.
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’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.