• Resolved alex-med

    (@alexporod)


    Is there a way to trim the title and only get for example the first 100 characters from the title?

Viewing 1 replies (of 1 total)
  • Plugin Support Freelancer Raju

    (@azizulraju)

    Thanks for your post.

    yes, there is a filter hook available. it’s called wcps_layout_element_title_text. you can follow this code

    add_filter('wcps_layout_element_title_text','wcps_layout_element_title_text_2622022', 99,2);
    
    function wcps_layout_element_title_text_2622022($title, $args){
        $title = mb_strimwidth($title, 0, 100, '..');
    
        return $title;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Trim Title’ is closed to new replies.