Support » Plugin: WooCommerce » shorten product titles – homepage

Viewing 1 replies (of 1 total)
  • <?php
      add_filter('the_title', 'modify_title', 10);
      function modify_title( $title ) {
        if ( is_front_page() ) {
          if ( strlen( $title ) > 10 ) {      
            $title = substr($title, 0, 10).'...';
          }
        }
        return $title;
      }
    
Viewing 1 replies (of 1 total)
  • The topic ‘shorten product titles – homepage’ is closed to new replies.