2024/05/16
ループで表示するカテゴリを指定する
ループ記述の直前に以下のコードを記述しましょう。
cat=1 の部分の数字を該当のカテゴリIDに書き換えます。
<?php query_posts('cat=1');?>
記事サムネールを有効化する
以下のコードをfunctions.phpに記入します
add_theme_support('post-thumbnails');
wordpressが自動的にPタグを挿入する機能を無効化する
以下のコードをfunctions.phpに記入します
// 記事に適用 remove_filter('the_content', 'wpautop');
// 抜粋に適用 remove_filter('the_excerpt', 'wpautop');