Tutorial: Remove Vantage Ratings in favor of GD Star Ratings
I wanted my visitors to be able to rate my listing without being logged. I have used GD Star ratings in the past, it is customizable, you can use multi-ratings so I decided to figure out how to swap out the old ratings system in favor of GD Star. It also allows my visitors to vote anonymously without being logged in since GD Star uses cookies and IP to log votes, a feature that is necessary for my concept. It was rather easy.
1. Remove old star system.
This was a simple edit to the
wp-content/themes/vantage/style.css file:
Change .stars{...} to .stars {display:none;}
2. Add GD Star to single listing
Install the plugin.
Under Settings click on article and click insert for individual post ( or whatever else you want) and choose an auto insert location. This gets us halfway there, all single listing will now have GD Star goodness. The same hold true for adding multi-ratings.
3. Add GD Star to multiple listings page
In the file /directory/
wp-content/themes/vantage/content-listing.php
Remove the following: ( This is the actual code for the built in stars, and the review count for multiple listings. I opted against having the review number, just looked out of place without the stars, so I removed the code, but you don't have to do anything, the CSS fix already removed the stars.)
PHP Code:
<div class="review-meta">
<?php the_listing_star_rating(); ?>
<p class="reviews"><?php
if ( va_user_can_add_reviews() ) {
echo html_link(
get_permalink( get_the_ID() ) . '#add-review',
__( 'Add your review', APP_TD )
);
echo ', ';
} else if ( !is_user_logged_in() ) {
echo html_link(
get_permalink( get_the_ID() ) . '#add-review',
__( 'Add your review', APP_TD )
);
echo ', ';
}
the_review_count();
?></p>
</div>
Find this code a bit further down:
PHP Code:
<div class="content-listing listing-faves">
<?php the_listing_faves_link(); ?>
</div>
Insert the following:
PHP Code:
<?php if(function_exists('wp_gdsr_render_article')){ wp_gdsr_render_article(); } ?>
That's it. Your stars should now be displayed above the favorite button.
I am a complete noob, I do not even know how to make a child theme, just started at this 3 days ago, but I figure this would be useful for anyone who does know how to do so. I have already benefited greatly from others on this forum and I wanted to take a second to give back.