A
A
aliasst2018-03-20 10:50:35
WordPress
aliasst, 2018-03-20 10:50:35

How to correctly write the condition in WordPress - display the "reply" button only for the admin ..?

Tell me how to correctly prescribe the condition in WordPress - display the "reply" button only for the admin ..? This is for comments

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2018-03-20
@aliasst

In template:

<?php if ( is_user_logged_in() && current_user_can( 'administrator' ) ) : ?>
    <!-- код кнопки -->
<?php endif; ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question