Using the Filter to Change Text


#1

Hi RT team,

Thanks for a great media plugin - the best for BuddyPress!

I read this post to understand how to change the text “Oops !! There’s no media found for the request !!” but I’m afraid I don’t know how to make use of the filter (rtmedia_no_media_found_message_filter).

I understand that it goes in my child theme’s functions.php, but I haven’t been able to determine the syntax.

Can you help me?


Custom front-end text change: "a media" and "Sorry !"
#2

Hi @jgwolfensberger,

Put below code in your theme’s functions.php file:

add_filter( 'rtmedia_no_media_found_message_filter', 'custom_no_media_found_message_function' ,10, 1 );
function custom_no_media_found_message_function( $message ) {
    $message = "Custom Message";
    return $message;
}

#3

Thank you so much. Works beautifully!


#4

Hi @jgwolfensberger,

I am glad to hear that your issue is fixed.


#5