I am trying to display a message like "Sorry no information here" if a field is not found and if field is found, no message should appear. I am using the ACF plugin for displaying fields on the front end in a user profile.
This is my code:
<?php $user_ID = get_current_user_id(); $label = 'user_' . $user_ID; the_field('Information', $label); ?>
If anyone has an idea, I have tried a lot of things but nothing helps. Thanks in advance. Nico
*Update: In fact, with ACF plugin for wordpress, I have created a field to display in user account in the backend of wordpress. So now I want to display this field (information) in the frontend account of the user.
If I need to put a message for my client, I put this message in the wordpress backend user account.
So in the frontend account, if I don't have put any message in this field (information), I want to display an automatic message like: "You don't have information yet"
If I put a message in the field (information) in the wordpress backend user account, I want the automatic message disappear and my message is displayed.
for now the message I put in field (information) in the backend account user is displayed correctly in the frontend user account *