Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('page_attributes_dropdown_pages_args', 'add_private_draft'); | |
function add_private_draft($args) { | |
$args['post_status'] = 'publish,private,draft'; | |
return $args; | |
} | |
?> |
functions.phpに追加。
Note
Description | 通常、非公開、下書き状態のページは親ページに指定出来ません(候補に出ない)が、CMSとして運用すると地味に必要になる事が多いのでメモ。初期設定のpublishにprivateとdraftを加えれば候補に出る。ただし、パンくず等には表示されません。 |
---|---|
WordPress Ver. | 4.5.3 |
Via | WordPress 固定ページの投稿ステータス |