【发布时间】:2019-05-06 10:21:37
【问题描述】:
我需要向除 wordpress 中的“订阅者”之外的所有用户角色显示 HTML 代码。
这是我无法工作的代码。
<?php
$current_user = wp_get_current_user();
?>
<?php if ( $current_user->role == 'subscriber' ) : ?>
<span>here is my html</span>
<?php endif; ?>
PS 正如你所知道的那样,我对 php 不太擅长。
【问题讨论】: