Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Beeinflusse den Original-Maintenance Mode von WordPress
// Aktiviere den WordPress Maintenance Mode
function wp_maintenance_mode(){
if(!current_user_can('edit_themes') || !is_user_logged_in()){
wp_die('<h1 style="color:red">Website im Wartungsmodus</h1><br />Wir müssen mal kurz an der Website schrauben. Bitte habe etwas Geduld, wir sind so schnell wie möglich wieder online.');
add_action('get_header', 'wp_maintenance_mode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.