Skip to content

Tag: wordpress-shortcode

Convert number to star rating php shortcode?

I’ve used the following code in order to generate a star rating inside a shortcode on my site. I’m new to PHP and incredibly confused. The issue I have is, how can I make $starNumber a variable number that I can change inside the shortcode? For example, if I wanted to show 3.5 stars with a shortco…