I am using get_posts to list the last few entries i have made. Some title are longer than the width of my sidebar and id like to limit the number of characters. Is there a way to do this easily with php?
this is my code so far:
<?php $posts = get_posts('numberposts=5&offset=0'); foreach($posts as $post) : ?>
<dd><a>"><?php the_title(); ?></a></dd>
<?php endforeach; ?>
- The topic ‘Limit Number of characters in sidebar’ is closed to new replies.