简体   繁体   中英

Hide class CSS for specific user role Wordpress

I need to hide the class ".price-rules-table-wrapper" from all users and visitors, with the exception of "Revenda" users.

it's possible?

Generally in PHP we can use something like this

Moreover you can find PHP docs

session_start();
 if($_SESSION['userlvl'] === "Revenda") {
    $userlvlpermission = '<div class="price-rules-table-wrapper">hiii</div>';
    }
 //At where you wanted to place the "price-rules-table-wrapper"
 <?php if($userlvlpermission){echo $userlvlpermission;}?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM