How-to and Troubleshooting
3
Posts
2
Users
2
Reactions
1,328
Views
Mar 27, 2020 2:22 pm
Hi,
Currently, when someone posts something new on a topic I am subscribed to, I get a notification containing the post topic name and one sentence from the reply. Is there some way to display more of the reply? Right now I believe it shows something like 50 characters. I'd like to increase that. Is that possible?
For example:
Hello! New reply has been posted on your subscribed topic -
In California, all new staff are currently mostly working from home. Our workers and buildings are...
2 Replies
Mar 28, 2020 8:57 am
Hi @douglascward,
Yes, you can do that using wpForo hooks. Put this code in your current active WordPress theme functions.php file. You can change the length too. I set it 100 for you.
function wpforo_custom_notification_text_length( $length ){
$length = 100;
return $length;
}
add_filter('wpforo_notification_saved_description_length', 'wpforo_custom_notification_text_length', 10);
add_filter('wpforo_notification_description_length', 'wpforo_custom_notification_text_length', 10);
How to Easily Add Custom Code in WordPress (without Breaking Your Site)