Notifications
Clear all

wpForo 1.x.x [Solved] Customizing Post Reply Notifications

3 Posts
2 Users
2 Reactions
1,181 Views
Posts: 16
Topic starter
(@douglascward)
Eminent Member
Joined: 5 years ago

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...

Topic Tags
2 Replies
Robert
Posts: 10527
Admin
(@robert)
Support Team
Joined: 8 years ago

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)

1 Reply
(@douglascward)
Joined: 5 years ago

Eminent Member
Posts: 16

@robert Excellent! Thank you!