• Resolved mikelangel001

    (@mikelangel001)


    Hi Ricard, the first thing is to congratulate you for the excellent plugin.

    I want to make a small change and do not like. I need that instead of text appearing Up Vote – Vote Down some icons appear “images” instead.

    I tried to do it this way but obviously does not work:

    $ link_up = '". <span class = rating-thumbs-up' (? (isset ($ type_of_vote) && ($ type_of_vote == 1)) 'rating-thumbs-voted':''). '" onclick = "thumbs_rating_vote (1 '$ post_id..'); "data-text =" '. __ (' <img src = https://www.cuantoanimal.com/wp-content/uploads/2014/01/thumb_up_hover.png /> ',' thumbs-rating ').' "> + '. $ thumbs_rating_up_count. '</ span>';

    Any way you can do it?

    Thank you very much, and congratulations on your work again.

    https://www.ads-software.com/plugins/thumbs-rating/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ricard Torres

    (@quicoto)

    Hi there,

    You would have to use only CSS to achieve this. You’ll need to override the plugin styles with yours.

    Try something like this in your style.css (inside your theme folder):

    .thumbs-rating-container span:before{ content = ''; }
    .thumbs-rating-container .thumbs-rating-up, .thumbs-rating-container .thumbs-rating-up{
       font-size:0;
      background-image: url(https://placekitten.com/100/100);
       height: 100px;
      width: 100px;
      display: block;
    }

    As you can see in the code above I’ve set a background image to the button. I’ve also added some width and height, as well as the display block.

    Give it a try and customise it to fit your needs.

    Thread Starter mikelangel001

    (@mikelangel001)

    Perfect! Thaks! ??

    If you were to use thumbs up/down icons of FontAwesome, you can add the following to your stylesheet:

    Looks like the code editor “eats” some of my code, here is a Gist then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Vote Up Replace text with images.’ is closed to new replies.