In my previous WordPress article I wrote about GD Star Rating (download link), a great solution when it comes to letting your visitors vote for your posts. Two days ago I worked with it, trying to implement a voting form to one of my posts and suddenly I ran into a serious question “How can I manually implement it in a post?”
I should explain this problem… You see if you need a rating form (thumb up/thumb down or a stars ratung form or your individual “multi”-form) under each and every your article there’s no problem – GD Star Rating adds it automatically if you’ll work with the settings a little bit. But what if you need the rating form to stand on just a few of posts and not in a standard place like above or under the posts, but somewhere in the middle? Yep, Houston we have a problem.
I went to the little forum here, but it looked like almost everybody needed this feature and nobody really knew how to get it. The plug-in’s author just said we all could take a look in the info folder and see the whole list of plug-in’s functions… Honestly I’m not a programmer, I know very little about PHP and stuff and all those functions told me nothing. I went to the official GD Star Rating web-site and finally found the user’s guide in about an hour running here and there! The author was kind enough to explain everything in that user’s guide, the problem is that it’s very hard to find :) So I would explain it all here in this article to save your time.
Everything’s really simple. For example you made your “multi”-form and it’s called “My voting form #1″. Now let’s get to your post. Switch for “Visual Mode”. Now look at the tool bar above – there’s a button with a star! How could you not notice it before for god’s sake?! :) If you don’t see this “star” button it means your integration isn’t on. Go to Settings » Integration and activate it.
Now click where you’d like to see the form and then click in the “star” button. You see a new small interface like this…
I need to insert my own Multi-rating form, so I use this drop-down menu and select “StarRatingMulti”. Please notice that you have only one additional inlay now – Multi Rating.
Now let’s get to the Multi Rating inlay. Set the Template for Default Multi Rating Block, then set the form you’d like to implement (in my case it’s “My voting form #1″)…
Now I would like to make one more little thing: I just want to set the “plain” stars for my rating form and I don’t need the stars to be that big (20px), so I set them on 16px.
Is it ready? So click the “Insert” button. What do we have here now? A line you need to have on the place where you wanna see your rating form.
Now press “Publish” and take a look at our rating form. Of course you have to work with CSS now to make it look really good, but technically it works now. Well done :)