简体   繁体   中英

How to style author id in WordPress?

How to add css to specific wordpress user to hide plugin fiction over front end? I installed the wp-about-author plugin but I need to set as hidden for admin user. So when the admin make any blog post then the wp-about-author wont be displayed. Unfortunately no feedback from the plugin developer. Thanks for any suggestions.

Try to update plugin better then hack css :) You can add to wp-about-author.php on line #102 something like:

if (wp_admin()) $return_content = '';

I didn't check it, but might work for you.

CSS way is not recommended since the user can check out actual DOM by view the source. Instead, You can prevent from even showing up in the DOM Tree by modifying a plugin php file.

$level = get_the_author_meta('user_level');

if ($level == 10) {
    return;
}

Add this line to wp-about-author.php on line #31. This works, I tested.

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