Limit Amount of characters to show on post preview?
-
Hi there, at the moment ive managed to code a news section for new posts here – http://www.soundrealmstudios.com/artists/phrak/
I want to try and edit the post so that rather than it showing the ENTIRE post and stretching the page, i want it to show a certain amount of characters and have a “Read More” link or something and then it takes you to the post.
What can i add to my code for this to work? (Thank you so much in advance)
<div id="news"> <?php $news = new WP_Query('cat=6&numberposts=5'); while ($news->have_posts()) : $news->the_post(); ?> <!-- begin post roll--> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <div class="instru-content2"> <?php the_content(); ?> </div> <?php endwhile; ?> </div>
I dont know what to add to limit the amount of characters to stop it from stretching the page… I also want to try and add a seperator so that you can plainly see the next post but ill tackle that at a later date (unless you guys feel generous with help!!) haha
thanks once more! 🙂
- The topic ‘Limit Amount of characters to show on post preview?’ is closed to new replies.