WordPress title limiting to 15 characters

I am using wordpress and I want to show upto 15 characters for my post title.

I have used this:

Read More
$myposts = get_posts('numberposts=11&offset=0');
foreach($myposts as $post) :
        substr(the_title(), 0, 15);
endforeach;

I have removed the PHP tags to look properly here…basically the code is marked as bold.

but it is not working.

Any suggestion is highly appreciable.

Related posts

Leave a Reply

2 comments