truncating the content output
-
I am trying to only show the first 100 characters of a post, which will be truncated with ‘…’. The code I am using so far is:
<?php query_posts('cat=3&posts_per_page=3'); if (have_posts()) : while (have_posts()) : the_post(); ?> <ul> <li> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); echo ": "; the_time(get_option('date_format')); ?></a><br /> <?php the_content() ?> </li> </ul> <?php endwhile; endif; wp_reset_query(); ?>
I think it’s a php kind of thing, anyone help me?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘truncating the content output’ is closed to new replies.