AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] How to reduce first 100 characters of reply's content in email notifications.

4 Posts
3 Users
0 Reactions
2,124 Views
JorgeW
Posts: 107
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jorgew)
Estimable Member
Joined: 7 years ago
[#8394]

Hi Support,

When there is a reply to any topic, wpForo sends to subscribed users an email notification.

This email includes the link to the topic, to the reply and the first 100 characters of the body contents of  the reply.

I need to reduce this intro to the reply's content to only the first 50 characters, how can I do that?

Thanks.


3 Replies
Sofy
Posts: 5776
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @jorgew,

I'll ask developers and let you know if it's possible. 


Robert
Posts: 10749
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Hi @jorgew,

There is a filter hook to change the post body length in emails:

'wpforo_email_notification_post_body_length'

 

Put this code in active WordPress theme functions.php file:

function wpforo_custom_post_body_lenght( $post_body_lenght ){
$post_body_lenght = 50;
return $post_body_lenght;
}
add_filter('wpforo_email_notification_post_body_length', 'wpforo_custom_post_body_lenght', 10);

Read this article to do it correctly:

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

 


1 Reply
JorgeW
(@jorgew)
Joined: 7 years ago

Estimable Member
Posts: 107
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Thanks @robert

Exactly what I needed. Works perfectly!!


Share: