Answer the question
In order to leave comments, you need to log in
How to display text to everyone except admin?
Hello!
Can you please tell me how to display the text to everyone except the administrator?
I have a part of the code that shows only the admin, but how can I make it so that everyone, including guests?
<?php if (current_user_can( 'administrator' )) : ?>
Тут текст
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
<?php if (current_user_can( 'administrator' )) : ?>
Тут текст
<?php else: ?>
Тут текст для тех кто не админ
<?php endif; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question