Home Forums General Issues User option


User option

  • Hi,

    I have created a new true/false field for specific user role “Member” to receive email notifications if a new post is published.

    However my code doesn’t seem to be working to check if the true false works. I think I have a problem querying the user.

    Below is my code:

    The code works if I remove the check for has_notifications, so I believe my problem lies somewhere in trying to retrieve the user ID within my function.

  • use get_field(), not the_field(). the_field method is attempting to echo the value. Not what you want in this instance as you are assigning that value to a variable.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘User option’ is closed to new replies.