Hello guys,
I'm looking for a way to dynamically truncate the custom fields that appear on my site's homepage.
I'm using this code:
<?php $posts = get_posts('numberposts=3&offset=1&category=3'); foreach ($posts as $post): setup_postdata($post); ?>
<a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, 'titre_propre',true) ?></a>
"titre_propre" is the personal custom field I'd like to truncate to, let's say, 40 characters.
Can anybody help me with this, please? That'd be much, much appreciated :)
Regards,
kReEsTaL