If the current user is an administrator or editor - WordPress Development Stack Exchange

PHOTO EMBED

Wed Oct 13 2021 17:04:58 GMT+0000 (Coordinated Universal Time)

Saved by @khalidlogi

<?php if( current_user_can('editor') || current_user_can('administrator') ) {  ?>
    // Stuff here for administrators or editors
<?php } ?>
  
  
  //or 
   if ( current_user_can( 'manage_options' ) ) {
content_copyCOPY

https://wordpress.stackexchange.com/questions/131814/if-the-current-user-is-an-administrator-or-editor