情報を追記している場合はありますが、古い情報を訂正はしていませんので、公開年月日を参照してください。プラグイン・タグ、いずれもワードプレス・PHPのバージョン等によって動作しない場合もあります。
functions に
function post_list($atts, $content = null) {
extract(shortcode_atts(array(
"ex" => '',
"type" => ''
), $atts));
global $post;
$myposts = get_posts('numberposts=-1&order=ASC&post_type='.$type.'&exclude='.$ex);
$retour='<ul>';
foreach($myposts as $post) :
setup_postdata($post);
$retour.='<li><a href="'.get_permalink().'">'.the_title("","",false).'</a></li>';
endforeach;wp_reset_postdata();
$retour.='</ul> ';
return $retour;
}
add_shortcode("list", "post_list");
ショートコードは list type=”custom_post_type” ex=”10″ のように。
カスタム投稿タイプのトップページを編集しやすいようindex.html を作成したので、それを除外するよう ex を設定。