I am working on a Wordpress site based on game reviews. The friend I am doing the site for requested the option to add rating stars to represent their opinion of the game. What I did was create 5 png images that could be included in the post for whichever rating they wanted (3-star.png ect.) That currently works fine if they put in the entire url of the image. I want this to be a bit more simple so I was wondering if there is a way that I could do something like...
<div class=\"ratewrap\">
<?php $postimageurl = get_post_meta($post->ID, 'rating', true); if ($postimageurl) { ?>
I am working on a Wordpress site based on game reviews. The friend I am doing the site for requested the option to add rating stars to represent their opinion of the game. What I did was create 5 png images that could be included in the post for whichever rating they wanted (3-star.png ect.) That currently works fine if they put in the entire url of the image. I want this to be a bit more simple so I was wondering if there is a way that I could do something like...
With this idea they would only have to type in the image name '3-star' instead of 'http://domain.com/wp-content/themes/mytheme/images/s-star.png'. I'm a total newbie to custom fields and PHP :)
I hope that makes sense.
Thanks
to your post to get a 5-star rating appear.