Please or Register to create posts and topics.

Title length in the widget

Hello,

I added the “recent messages” widget on my homepage but the topic names are truncated to 35 characters. How to change this value to have 40 ?

Thank you

Hello @jonathan-2

You can change the length of the widget-titles via the asgarosforum_filter_widget_title_length-filter.

Here is an example-code which you can add to your themes functions.php-file:

add_filter('asgarosforum_filter_widget_title_length', 'custom_widget_length');

function custom_widget_length($length) {
    return 50;
}

 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Can the same be done to the excerpt?

Nevermind, I figured it out.

add_filter('asgarosforum_widget_excerpt_length', 'custom_widget_excerpt_length');
      function custom_widget_excerpt_length($length) {
           return 300;
}

 

Asgaros has reacted to this post.
Asgaros