• Hi Jeff,

    I have 2 issues:

    1. The star ratings I added to the testimonials my clients wrote, don’t show. Neither on the page (with test lay-out) nor in the rotating widget.

    2. The url above shows the testimonials I chose, but there’s no white space between them. I’d like to have something like this.

    For now, I’ll keep using the last page, with more white on it, but it would be better if HMS gives a better lay-out. That saves a lot of time and overlaps.

    Do you know when you’ll have time to solve this lay-out issue? If that’s done, HMS is the perfect testimonials plugin for me!

    Thanks in advance, keep up the good work and have a great weekend!

    https://www.ads-software.com/plugins/hms-testimonials/

Viewing 15 replies - 1 through 15 (of 31 total)
  • Plugin Author Jeff K

    (@kreitje)

    1. The star ratings was a feature I added on after the fact. This plugin has a thing called templates where you can control where an item of the testimonial is displayed. In your WordPress dashboard go to “Testimonials” and then “Templates”. From there, edit the template you are using. If you didn’t change it, it is template #1. Click the edit link. Then move “5 Star Rating (System)” from the Unused Items list to the Active Items list. They should show up then.

    2. The plugin is pretty bare formatting wise. It is up to the user to adjust the CSS to get it how they want.

    To add spacing, add something like this to your stylesheet:

    .hms-testimonial-container {
    padding-bottom:20px;
    }

    Jeff

    Thread Starter HvH

    (@hvh)

    Hi Jeff,

    Thanks again for the quick and clear answers. I didn’t even know of HMS templates, so I just learned something new. I’ll look into right now – I’m very curious. And I’ll add some CSS.

    Again: it would be nice if non technical people (my clients) could do this too, with an interface.

    Thread Starter HvH

    (@hvh)

    Hi,

    I did what you suggested at [1] but the only thing I see is: 5 out of 5. I expected to see images of stars. That makes it much more attractive and much more clear to quick readers (scanners).

    And is it possible to give points that show like partly filled stars or – if this is too complex – half stars? The steps are quit big now.

    Thread Starter HvH

    (@hvh)

    Hi,

    I entered this code in my Style.css but nothing happens when I press CTRL+F5…

    Plugin Author Jeff K

    (@kreitje)

    1. The nice thing with this plugin is a lot of the frontend output can be adjusted with filters. To show actual stars you need to add this filter to your themes functions.php file.

    function hms_rating_override($text) {
    		/**
    		 * Detect the current rating
    		 */
    		$matches = null;
    		$getMatches = preg_match('/data-rating=\"(\d)\"/', $text, $matches);
    
    		if ( count($matches) == 2 ) {
    			$rating = $matches[1];
    
    			return '<img src="/path/to/my/star/images/' . $rating . '.png" alt="' . $rating . ' out of 5 stars" itemprop="ratingValue" />';
    		}
    
    		return $text;
    	}
    	add_filter('hms_testimonials_system_rating', 'hms_rating_override');

    You will need to provide your own star images and modify the filter to work as you need.

    This line you can adjust the path to your images. It makes 2 assumptions. 1. All images are in the same folder. 2. All images are named their rating number.png. Ex: 1.png, 2.png …. 5.png

    return '<img src="/path/to/my/star/images/' . $rating . '.png" alt="' . $rating . ' out of 5 stars" itemprop="ratingValue" />';

    When I find some time to make quality improvements I will probably turn this into some sort of option.

    2. The spacing is there. You may want to increase it a bit more.

    Thread Starter HvH

    (@hvh)

    Hi Jeff,

    Thanks a lot! It would be really great if this can become a feature in some kind of visual editor in the dashboard (at the settings page for instance). I just wrote a blog about HMS Testimonials in wich I say how great it is, when I discovered the things I posted questions about. HMS is nearly perfect, but the spacing and images (stars and portraits) don’t work very well yet. That’s a pitty.

    Thread Starter HvH

    (@hvh)

    Oh, one more thing: does it matter where I put the PHP code in the file? I’m good at HTML but not at PHP.

    Plugin Author Jeff K

    (@kreitje)

    I would stick it at the bottom of your themes functions.php. Technically it doesn’t matter but most often people know to look at the bottom for customizations.

    Some parts are definitely tricky and a can be painful. I am working to find the best balance between flexibility and usability.

    I built this plugin because at one point I was working on 3 different WordPress sites that all needed to handle testimonials differently (content and design). So it was built to be very flexible for developers. At the same time, this means it’s harder for everybody else to use.

    Now I don’t even build WordPress sites anymore and being a free plugin, it’s hard to justify putting it in front of paid work. I am hoping to find some time this winter to spruce it up and create a lot better documentation.

    That’s probably more than you want to know but that’s where I am at and why it was built how it is.

    Thread Starter HvH

    (@hvh)

    Okay, thanks. I understand completely. Every extra option that makes it easier to use for non developers is highly appreciated and will be seen as a gift ??

    It’s great that you do all this after work, I really appreciate it.

    Thread Starter HvH

    (@hvh)

    I tried this, but nothing happens whatsoever. I uploaded the images with ftp AND in the dashboard, I changed the return path in the code to the ftp-upload folder. I also changed the 20px white space to 40, but the test page doesn’t change.

    Plugin Author Jeff K

    (@kreitje)

    Did you add that filter to your themes functions.php file?

    Thread Starter HvH

    (@hvh)

    Yep!

    Plugin Author Jeff K

    (@kreitje)

    Do you have a caching plugin installed on that site?

    Thread Starter HvH

    (@hvh)

    Yes, I have.

    Thread Starter HvH

    (@hvh)

    Hi Jeff,

    What will your next question be? ??
    Or what can I do to address this problem?

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘Star rating doesn't show & schortcode displays texts without enters’ is closed to new replies.