以下代码已过期,有人能帮我更新此代码吗?
if ( !current_user_can( \'manage_options\' ) ) {
remove_action( \'init\', \'_wp_admin_bar_init\' );
}
以下代码已过期,有人能帮我更新此代码吗?
if ( !current_user_can( \'manage_options\' ) ) {
remove_action( \'init\', \'_wp_admin_bar_init\' );
}
您必须使用show_admin_bar(false);
要禁用admin barto禁用除admin之外的所有管理栏,请将此添加到函数中。php
add_action(\'after_setup_theme\', \'remove_admin_bar\');
function remove_admin_bar() {
if (!current_user_can(\'administrator\') && !is_admin()) {
show_admin_bar(false);
}
}
你可以参考一下here有人能帮我看看这段代码中的错误吗?我正试图通过我发现的短代码实现一个函数here:<?php if (function_exists(‘wooslider’)) echo do_shortcode(‘[wooslider slider_type=\"posts\" limit=\"3\" link_title=\"true\" layout=\"text-bottom\" overlay=\"full\" category=\"homepage-feature-post\"]‘); ?>&#x