7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WordPress の管理画面でカスタムJSの読込

Last updated at Posted at 2013-06-12

手順.1

任意のテーマの functions.php に、アクションを追加

function _register_custom_js( ) {
	$_current_theme_dir = get_template_directory_uri();
	$_custom_js = '<script type="text/javascript" src="{$_current_theme_dir}/wp-admin/custom.fnc.js"></script>';
	echo $_custom_js . "\n";
}

add_action('admin_head', '_register_custom_js');

手順.2

テーマディレクトリの下層に /wp-admin/custom.fnc.js を作成してFTPアップロード

手順.3

前述の custom.fnc.js をカスタマイズ

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?