Hello myntkat,
we can add a function to limit numbers of text for the title this way you can add post with any length of title in it
you can add this to your function.php file
function custom_title($before = ”, $after = ”, $echo = true, $length = false) { $title = get_the_title();
if ( $length && is_numeric($length) ) {
$title = substr( $title, 0, $length );
}
if ( strlen($title)> 0 ) {
$title = apply_filters(‘the_titlesmall’, $before . $title . $after, $before, $after);
if ( $echo )
echo $title;
else
return $title;
}
}
and update the content.php about line 15 from
<?php the_title( sprintf( ‘<h3 class=”entry-title”>‘, esc_url( get_permalink() ) ), ‘</h3>’ ); ?>
to
<h3 class=”entry-title”>“><?php custom_title(”, ‘…’, true, ’20’); ?></h3>
make sure if you do this you have an ftp so you can undo any changes you made if you broke something
thanks
<h3 class="entry-title"><a href="<?php the_permalink('') ?>"><?php custom_title('', '...', true, '20'); ?></h3> correction for the code to replace
Hello!
Thank you for the reply. I added the code as specified, the titles are now shortenend, but the tiles are still uneven. You can have a look at it here:
http://www.shinylife.co.uk/
From the second row on, the tiles aren’t evenly spaced anymore.