LIKE button

Hi rtmedia,

I like to rename the word " Like " and " Unlike " and also the phase " You Like This " on the right side of the lightbox.

Can you tell me which the best way to do that?

Please help by functions or the file (path) to change from?

Please advise help, Thanks

Hello @DamnDramaQueen,

To change the text “Like”:

You can use the filter rtmedia_like_label_text.

To change the text “Unlike”:

You can use the filter rtmedia_like_undo_label_text.

This document demonstrates, how you can replace the text with an icon using the same filters - https://rtmedia.io/docs/developers/hooks/rtmedia_like_label_text-rtmedia_like_undo_label_text/

For the text “You like this” involves some conditional checks for a single user like, multiple user likes. I will check and let you know the possible workaround soon.

Thanks,

Hi pranalipatel,

I changed the image path to my of course. But, hmm, it seems to work very little, it only show one image when I clicked on like button…NOT both?

It ONLY show the UNLIKE image, It doesn’t show the LIKE image?


Also, No word changes over? It still read as Like and Unlike?

For example what I had changed from.
case ‘like’: TO case ‘hope you like’: case ‘unlike’: TO case ‘I do not like it’:

I was thinking to attach a screenshot, but nothing really changed at all… So everything is remain as normal. Please advise help, Thanks

Hello @DamnDramaQueen,

case ‘like’: TO case ‘hope you like’:

Please, try adding below code to your theme’s functions.php file:

function rtmedia_custom_update_like_label_text( $label ){
    $label = "Hope you like";
    return $label;
}
add_filter('rtmedia_like_label_text','rtmedia_custom_update_like_label_text');

case ‘unlike’: TO case ‘I do not like it’:

Please, try adding below code to your theme’s functions.php file:

function rtmedia_custom_update_unlike_label_text( $label ){
    $label = "I do not like it";
    return $label;
}
add_filter('rtmedia_like_undo_label_text','rtmedia_custom_update_unlike_label_text');

I hope this helps you. Thanks.

Hi pranalipatel

This new function works like a CHARM…:slight_smile: . It did renamed both words… Nice! :slight_smile:

Thanks so much for your help

Btw, could you possible also help me with a function for the phase " You Like This " ? I also like to rename it too.

Please advise, thanks much,