Home › Forums › General Issues › Hiding Empty/Unhiding non-empty Fields not working › Reply To: Hiding Empty/Unhiding non-empty Fields not working
I placed the above code in a template file and it broke the template. The data is coming from a field added to a user’s profile. While editing the profile on user-edit.php, I can see that the data has successfully saved.
The problem is that the hide/unhide code referenced in my original post doesn’t really pull and unhide the data and its label.
<?php if( get_field('street_address_address') ): ?> <p>My real address: <?php the_field('street_address_address'); ?></p> <?php endif; ?>
The code above shows how I’ve coded my template. If it were to work, it should say:
My real address: 4027 e. kyle
But instead nothing shows. Here is the actual page:
The label and data should show up under the photo/ID #.
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!