Custom Post Type UI 設定の覚書
LaTeX試し書きなのにLaTeXと関係ない覚書を残す。
親テーマ Weaver-Xtreme に対する子テーマでこのブログを表示させる設定である。
タクソノミー等の設定は試行錯誤あるいは他のサイトを参照。例えばここ。
投稿を表示させるには
親テーマの index.php、 single.php を複製してそれぞれ page-latextrial.php、 single-latextrial.php を作成。
page-latextrial.php の “have_posts()” があるあたりを以下のように編集。
1 2 3 4 5 6 7 |
$args = array( 'post_type' => 'latextrial', /* 投稿タイプを指定 */ 'paged' => $paged, ); query_posts( $args ); if ( have_posts() ) { |
メニューなどに設置すれば表示できる。
コメント
Custom Post Type UI 設定の覚書 — コメントはまだありません
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">