0
私はアーカイブページに表示されている投稿のnumbrerを変更したいと思います。 そのことを教えてください、ありがとうございます。アーカイブページにカスタム数の投稿を表示する方法は?
これは私がアーカイブページの投稿の異なる数を持つようにしたい私のarchive.php
<div id="content-a">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="imgdiv"><a href="<?php the_permalink() ?>"><img src="<?php echo catch_that_image() ?>" width="250"></a></div>
<div class="p-heading"><h1><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1></div>
<div class="p-content"><?php the_excerpt(); ?></div>
<div class="p-info"><?php the_time('j.m.Y') ?> | <?php the_category(', '); ?> | <img src="http://www.virmodrosti.com/wp-content/uploads/comments.png" alt="Komentarji" width="26" height="12"><?php $totalcomments = get_comments_number(); echo $totalcomments; ?></div>
</div>
<?php endwhile; ?>
からコードです。ありがとうございました。
ありがとうしてみてください。このルールを検索結果にも適用したい場合は、is_archiveの後にis_searchを追加するだけですか? – Techuser
チェック私は答えを更新しましたが、最後に変更する前に試してください。 –
ありがとう、それは正常に動作します。 – Techuser