Broken Kode Discussion Forums

A place to talk about the Rin and Manji themes

You are not logged in.

#1 09-12-2005 15:36:53

marileev
New member
From: Bellevue, WA.
Registered: 12-08-2005
Posts: 5
Website

Help Truncating Main page/index.php file

Not sure which part I should edit in teh index.php file to shrink the length of the blog posts which appear on our main page.

We've posted 10 stories on our Blog http://www.iwantmyess.com as "Posts" and would like to only keep the newest three on the main page.

I know the chunk of code I need to edit is as follows:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       <div class="post">
        <div class="title" id="post-<?php the_ID(); ?>">
         <a href="<?php the_permalink() ?>" rel="bookmark">
          <?php the_title(); ?>
         </a>
        </div>
         <br>
        <h3><span class="posted"><?php _e("Posted on "); ?></span>
        <?php the_time('l j F Y',display); ?> 
       </h3>
        <div class="storycontent">
         <?php the_content(__('(more...)')); ?>
        </div>
        <div class="meta">
         <div class="author">
          <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?>

         </div>
         <?php _e("Filed under:"); ?> <?php the_category(' and') ?>
        </div>
        <div class="feedback">
         <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments')); ?>
        </div>
        <?php wp_link_pages(); ?>
        <!--<?php trackback_rdf(); ?>  -->
       </div> <!-- Closes the post div-->
       <?php comments_template(); // Get wp-comments.php template ?>
       <?php endwhile; else: ?>
       <?php _e('Sorry, no posts matched your criteria.'); ?>
       <?php endif; ?>
       <div class="postnavigation">
        <div class="rightdouble">
         <?php posts_nav_link('','','previous posts + »') ?>
        </div>
        <div class="leftdouble">
         <?php posts_nav_link('','« + newer posts ','') ?>
        </div>
       </div>
      </div> <!--Closes the contentright div-->
     </div> <!-- Closes the content div-->
     <div id="bottomcontentdouble">
    </div>
</div> <!-- Closes the container div-->
<?php include('footer.php'); ?>


Any help would be GRRREAT! Thanks,

Marilee

Offline

 

#2 09-12-2005 18:10:59

MacManX
Moderator
Registered: 28-03-2005
Posts: 80
Website

Re: Help Truncating Main page/index.php file

Just login to your WordPress admin interface, go to Options/Reading, and set "Show at most:" to "3 posts".

Last edited by MacManX (09-12-2005 18:11:42)


Disclaimer: I am a forum volunteer.  I only represent Rin as a user and reserve the right to refuse service to anyone at anytime.  The opinions stated in my postings are not necessarily those of Khaled Abou Alfa or his affiliates.

MacManX.com

Offline

 

#3 12-12-2005 11:14:09

marileev
New member
From: Bellevue, WA.
Registered: 12-08-2005
Posts: 5
Website

Re: Help Truncating Main page/index.php file

Durrrr... Thanks soo much! Worked like a charm  big_smile I guess I've gotten so busy customizing other parts of the blog never thought to go to the Options tab. --Marilee

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson