3
3

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】投稿テーブルに列を追加する方法

Posted at

functions.phpにコードを追加

functions.php
function list_add_pri($column){
  //必要ないテーブルを削除
  unset($column['comments']);

  //テーブルの追加
  $column += array("key" => "val");
  return $column;
}
add_filter("manage_edit-post_columns","list_add_pri");

見出しが追加されるので、追加された列に値を入れる

functions.php
function list_val_pri($op){
  echo '追加した列に入れる値を入力';
}
add_filter("manage_post_posts_custom_column","list_val_pri");
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?