Hallo,
diese Frage hatte ich schon mal gestellt und sie wurde mir auch beantwortet:
[COLOR=#007700][FONT=monospace][/FONT][/COLOR][FONT=monospace]
ZitatAlles anzeigen[/FONT][COLOR=#007700][FONT=monospace]
[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]/**
* Remove WordPress Toolbar for all users except admins and editors
*
*/
[/FONT][/COLOR][COLOR=#007700][FONT=monospace]function [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mytheme_remove_admin_bar[/FONT][/COLOR][COLOR=#007700][FONT=monospace]() {
if ( ! [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]current_user_can[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'publish_posts' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ) {
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]show_admin_bar[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]false [/FONT][/COLOR][COLOR=#007700][FONT=monospace]);
}
}
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]add_action[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'after_setup_theme'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'mytheme_remove_admin_bar' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]);
[/FONT][/COLOR][COLOR=#007700][FONT=monospace][/FONT][/COLOR][FONT=monospace]
[/FONT][COLOR=#007700][FONT=monospace]
[/FONT][/COLOR]Nur das Problem ist, dieser Code funktioniert nicht mehr. Sobald ich diesen Code in die functions.php der normalen oder Child Theme Einfüge, funktioniert die komplette Seite nicht mehr. Könnt ihr mir weiterhelfen?
LG