N
N
nulledbox2020-08-05 09:31:48
WordPress
nulledbox, 2020-08-05 09:31:48

How to hide ACF fields from guests?

I use the ACF plugin for a lot of fields, and I need to hide a couple of fields from prying eyes. So that only those who are authorized can see them. I could not find a solution on the acf website, or I looked like that)))

Field to hide:
<?php the_field( 'cloud' ); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IvanMogilev, 2020-08-05
@IvanMogilev

if ( is_user_logged_in() ) {
  the_field( 'cloud' ); 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question