cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

The title_length parameter doesn't seem to work with {text_title} #241

Closed cabrerahector closed 4 years ago

cabrerahector commented 4 years ago

Describe the bug

The title_length parameter doesn't work with {text_title}. If you switch it with {title} then the title gets trimmed as expected.

To Reproduce

$args = array(
    'limit' => 5,
    'range' => 'all',
    'post_html' => '<li class="list-group-item"><a class="h6 h6-md h6-lg" href="{url}">{text_title}</a></li>',
    'title_length' => 5
);
wpp_get_mostpopular($args);

Expected behavior

Title should be shortened in both cases.

Environment:

mrnasil commented 4 years ago

Thanks.