PHP: Fixing Featured Item in Wordstrap

Open up part_featured.php in your favourite editor (it should be located in ./partials), find line #65:
<a href="<?php the_permalink(); ?>"><?php echo ws_title_excerpt(strip_tags(get_the_title())); ?></a>

Replace this line with:

$trim_title_holder = get_the_title();
$title_trimmer = wp_trim_words( $trim_title_holder, $trim_words = 4, $trim_more = ‘… ‘ );

<a href="<?php the_permalink(); ?>"><?php echo $title_trimmer; ?></a>

This will fix those mangled characters in the title.

Add a Comment

Your email address will not be published. Required fields are marked *