Home Forums WTI Like Post PRO Show the word "votes" after the total votes and add thousands separator Reply To: Show the word "votes" after the total votes and add thousands separator

#381
Webtechideas
Keymaster

The changes are lost because the content is loaded from ajax call where you have not added the necessary changes. You can modify the javascript code dealing with this ajax call. Please open wti-like-post.js file present inside ‘js’ folder using any text editor. There you need to change the following lines

jQuery(".lc-" + post_id).html(response.like);
jQuery(".unlc-" + post_id).html(response.unlike);

to

jQuery(".lc-" + post_id).html(response.like + ' votes');
jQuery(".unlc-" + post_id).html(response.unlike + ' votes');

As you can see, we have concatenated the term ‘votes’ to the like and unlike count. You can also apply the thousands separator to the response above. Please refer here. Do let us know if this helped or not.

Thanks