on index.php max 5 post, on archive pages all
-
Hi!
On my site https://svenigson.com I have the “Other recent topics” listing, and I want there maximum 5 post listed, but in the wp-admin I entered “show post: of the last 365days”, becouse I want all the post displayed onthe archive pages. How can I do this???
<backticks>
<?php if( $featured_post ) : ?>
<?php foreach( $featured_post as $post ) : setup_postdata( $post ); ?>
<?php $featured_post_id = $post->ID; ?>
<div class="right">
<div class="righttopunderline"></div>
Read More
" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read
the whole entryPost Category
<?php the_category(' / ') ?>Discuss this Entry
<?php comments_popup_link('0 new comments', '1 new comment', '% new comments'); ?>RSS Feed
<?php comments_rss_link('Follow trough RSS 2.0'); ?>
</div>
<h1>
<?php the_title(); ?>
</h1>
<div class="mainunderline"></div>
<div class="entryindex">" rel="bookmark">
<?php the_excerpt(); ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
<div class="right">
<h1>Inspired by work</h1>
<div class="rightunderline"></div>
<?php get_links_list(); ?>
</div>
<?php if (have_posts()) : ?>
<h1>Other recent topics</h1>
<div class="mainunderline"></div>
<?php while (have_posts()) : the_post(); ?>
<?php if( $post->ID == $featured_post_id ) continue; ?>
<table width="350px" border="0" cellspacing="0" cellpadding="0" style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eeeeee;">
<tr style="background-color: #ffffff;" onmouseover="this.style.backgroundColor='#fffeef';" onmouseout="this.style.backgroundColor='#ffffff';" >
<td><div class="smallheader">" rel="bookmark">
<?php the_title(); ?>
</div>
<div class="smallmeta">Posted
<?php the_time('Y-m-d') ?>
| Comments to this topic
<?php comments_popup_link('0', '1', '%'); ?>
| <?php comments_rss_link('RSS 2.0'); ?> Feed
Post category
<?php the_category(' / ') ?>
</div></td>
</tr>
</table>
<?php endwhile; ?>
<?php else : ?>
<h1>Not Found</h1>
<div class="mainunderline"></div>
<div class="entryindex">Sorry, but you are looking for something that isn't here.</div>
<?php endif; ?>
</backticks>This is the source in my index.php, I think here should I edit the loop, but how?
Thx for info!
- The topic ‘on index.php max 5 post, on archive pages all’ is closed to new replies.