I have a custom post type 'news' and would like to limit the title character length to 42 characters on the custom post type archive page for 'news'
The following code is how the title is displayed on the archive page for this CPT
<h2><a href="<?php the_permalink();?>"><?php the_title(); ?></a></h2>
Do I pass a parameter into
the_title() function, there doesn't seem to be any info suggesting you do this on the codex, or will I do it in my functions.php file?
Many thanks in advance.