Home › Forums › Front-end Issues › Custom Field Not Displaying in Front End › Reply To: Custom Field Not Displaying in Front End
Okay. You’re dealing with an idiot here.
I’ve added another field under the Category Background Image Custom Field so when the user chooses the Category Background image, they can also add the Product Background image (the settings are the same as the Category Background Image field) so all products under that one category will share the same image. This is logical.
But I’m wondering if that makes a difference in the call in the template.
I’m using the same code, but changed to post the ‘product’ image field:
<div class=”catback” style=”background-image: url(‘<?php the_field(‘products_background_image’, $taxonomy . ‘_’ . $term_id); ?>’);”></div>
But it comes up blank. Why would it make much difference which field I’m calling if it’s for a specific taxonomy?
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.