• hi, how do i get this to work?
    <?php echo mb_strimwidth( the_subtitle(), 0, 20, ‘…’ ); ?>

    this works with the regular title:
    <?php echo mb_strimwidth( get_the_title(), 0, 20, ‘…’ ); ?>

    “get_the_title()” in that code above doesn’t return anything…

    want the subtitles to be trimmed after a certain number of characters so long subtitles would trail off with “…”

    • This topic was modified 5 years, 10 months ago by sank.
Viewing 1 replies (of 1 total)
  • Plugin Author Ben Huson

    (@husobj)

    Use the_subtitle( ‘’, ‘’, false )

    The false parameter returns the subtitle instead of outputting it.

Viewing 1 replies (of 1 total)
  • The topic ‘trim subtitle function with ellipses (…)’ is closed to new replies.