Simplicityでカスタム投稿タイプの記事編集画面に「作成者」を表示させる

良く出回っている方法だと上手くいかず、いろいろ探してこちらで上手くいきました。

// カスタム投稿タイプの記事編集画面に「作成者」を表示させる
function codex_custom_init() {
    $args = array(
        'public' => true,
        'label' => 'exsample',
        'supports' => array( 'title', 'editor', 'author' )
    );
    register_post_type( 'exsample', $args );
}
add_action( 'init', 'codex_custom_init' );

supports に指定可能なもの

title
タイトル
editor
本文
author
作成者
thumbnail
アイキャッチ画像
excerpt
抜粋
trackbacks
トラックバック
custom-fields
カスタムフィールド
comments
コメント
revisions
リビジョン
page-attributes
ページ属性

参考にさせていただいたページ
https://www.understandard.net/wordpress/wp031.html

ありがとうございました。

シェアする

フォローする