
MacのVSCode(VisualStudioCode)のClineでOllamaが動作しない時の解決備忘録
2024.11.13

WordPressでメディアのサムネイルを一括で再生成するプラグイン『Regenerate Thumbnails』
2023.09.23

MacでOpen Interpreterをローカルで動かした際に、CodeLlama Modelがダウンロードされる場所
2023.09.09
Category WordPress Tips Update 2008.05.26
サイドバーに特定のカテゴリーのみを表示させたいと思い
任意の場所に下記を記述するとカテゴリ中のタイトルと記事を表示できます。
<?php $posts = get_posts('numberposts=2&category=1'); foreach($posts as $post) : setup_postdata($post); ?> <h2 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="storycontent"> <?php the_content(__('(more...)')); ?> </div> <?php endforeach; ?>
を記述しコードの1行目の下記箇所を変更
numberposts=2←表示させたい記事の件数
さらに
category=1←カテゴリの通しID
で表示できます。