The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Custom Shape for Cu...
 
Notifications
Clear all

[Solved] Custom Shape for Custom Ratings

5 Posts
2 Users
1 Reactions
5,805 Views
(@zo-zo-lee)
Posts: 9
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#10852]

If I add a custom icon to my custom rating field, it makes no sense to display the result as stars anyway... (in this case, it should be a range from too small to too loose, so 3 is perfect, not 5)
 

stripes not stars

How can I change the shape for the results display so that it's bars instead of stars?


 
Posted : 04/08/2025 11:01 am
(@jacob)
Posts: 132
Estimable Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi @zo-zo-lee 


Check these links out, please.

https://wpdiscuz.com/docs/codex/filters/wpdiscuz_half_star_svg/
https://wpdiscuz.com/docs/codex/filters/wpdiscuz_full_star_svg/


In case you want to say thank you! 🙂

We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 04/08/2025 5:27 pm
(@zo-zo-lee)
Posts: 9
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Thank you!
  However, the actual product rating should still be stars. Is there a way to change just one custom rating field.


 
Posted : 05/08/2025 5:33 am
(@jacob)
Posts: 132
Estimable Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@zo-zo-lee

You can use the provided hooks and do something like this

add_filter('wpdiscuz_full_star_svg', function ($svg, $type, $icon) {
    if ($icon === 'fas fa-square') {
        $svg = '<svg width="100" height="100" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 H90 V90 H10 Z" fill="none" class="wpd-star"/></svg>';
    }

    return $svg;
}, 10, 3);

add_filter('wpdiscuz_half_star_svg', function ($svg, $type, $icon) {
    if ($icon === 'fas fa-square') {
        $svg = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 H90 V90 H10 Z" fill="none" class="wpd-star"/><path d="M10 10 H17 V90 H10 Z" fill="none" class="wpd-star wpd-active"/></svg>';
    }

    return $svg;
}, 10, 3);

In case you want to say thank you! 🙂

We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 05/08/2025 7:38 pm
(@zo-zo-lee)
Posts: 9
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Ahh, now I get it. Thank you so much! 😊 


 
Posted : 07/08/2025 8:02 am
Jacob reacted