WordPressをメンテナンスモードにする方法 2024年3月10日 / 1 min read View more blogs with the tag wordpress Table of Contents #はじめに #方法 はじめに WordPressをメンテナンスモードにする方法です。 方法 functions.phpに以下のコードを追加するだけ! wp_die()中の文言が表示されます。 functions.phpfunction maintenance_mode() { if (!current_user_can('edit_themes') || !is_user_logged_in()) { wp_die('当サイトはメンテナンス中です。'); }}add_action('get_header', 'maintenance_mode');