How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums FAQ How to changes rating icons or disable half stars

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4431
    admin
    Keymaster

    How to disable half stars in PokaTheme

    In Poka theme from v3 and above half stars in ratings are by default enabled.

    If you don’t want to show half stars then you can add the following to your functions.php in your child theme:

    add_filter(‘poka_ratings_half_icon’, ‘__return_true’, 100);


    How to set your own icons for the ratings

    If you want to replace Poka theme stars with your own elements you can use the following filter:

    add_filter(‘poka_rating_icons_array’,’poka_change_rating_icons’);
    
    function poka_change_rating_icons(){
    
        return array(
    
            'full_star' => '<span class=”icon icon-full”></span>',
    
            'half_star' => '<span class=”icon icon-half”></span>',
    
            'empty_star' => '<span class=”icon icon-empty”></span>',
    
        );
    
    }

     

    • This topic was modified 6 months, 2 weeks ago by admin.
    • This topic was modified 6 months, 2 weeks ago by admin.
    • This topic was modified 6 months, 2 weeks ago by admin.
    • This topic was modified 6 months, 2 weeks ago by admin.
    • This topic was modified 6 months, 2 weeks ago by admin.
Viewing 1 post (of 1 total)
  • The forum ‘FAQ’ is closed to new topics and replies.