Is there a way to trim the post title, or post title link ([wpv-post-link]), to like 8 words in the legacy view loop editor?
Thanks,
tim

Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
There is no native way but either you can add the custom shortcode to shorten your post title by using custom shortcode.
For example - To limit the output from any field to a certain number of words, you can register a custom shortcode:
function word_trim_custom_func( $atts, $content = null ) {
$args = shortcode_atts( array(
'words' => '8',
'title'=>'',
), $atts );
return wp_trim_words($args['title'], $args['words'] );
}
add_shortcode( 'word_trim_custom', 'word_trim_custom_func' );
The above code snippet can be included through either Toolset's "Custom Code" section:
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/
After that, you can call the above shortcode as:
[word_trim_custom words="8" title="[wpv-post-title]"]
Alternatively - you can check the following Doc:
- hidden link