StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have -- and this forum will be removed on July 1st, 2013.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-05-2010, 12:10 AM
sourapplestudio sourapplestudio is offline
Registered User
Genesis Member
 
Join Date: Nov 2009
Posts: 78
Default full length & "read more" posts together?

The following is a portion of my archive.php file that allows for the first post to be full length (ignores the 'read more' tag) and the rest acknowledge the 'read more'. However, I want to have the first 2 posts full length, and then the rest show the teaser. I tried changing the -1 below to -2, and that didn't work. Any ideas? (http://sourapplestudio.net/client4/)

HTML Code:
        <div class="postarea">
    
                    
<?php global $more; $more = -1; //declare and set $more before The Loop ?>
                                    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <div class="date">
                <div class="dateright">
                    <p><span class="time"><?php the_time('n.j.y'); ?></span> </p> 
                </div>
            </div>
                        <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>


<?php 
    if ($more == -1) { //do not use the more tag on the first one.
        the_content();
        $more = 0; //prevent this from happening again. use the more tag from now on.
    }
    else { //use the more tag
        the_content(__('Read more...'));
    }
?>
<div class="clear"></div>
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Change "Read More Posts From" Links for homepage featured columns? Moviemikes General Discussion 4 03-08-2010 11:45 AM
How to Place "Read Full Story" Link in Catagories maliburealestatenews General Discussion 5 12-04-2009 07:24 AM


All times are GMT -5. The time now is 09:10 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.