Worpress Comments Question

Status
Not open for further replies.

chuckie

rebmeM
Sep 28, 2006
65
0
0
Happy Hour
I am using a plugin to make a review site in WP.

Code is added to comments.php to display the plugin.

I do not want this plugin displayed on WP pages, only on posts.

Is there a way to edit the code below which is in comments.php to not show it on WP pages?

PHP:
<?php echo dgrs_get_comment_ratings($comment->comment_ID); ?>
Or, is there a way to have say a comments2.php without that code so that the page template would call comments2 instead and not display the review plugin.

Thanks in advance.

chuckie
 


It would go something like this....



<?php if (is_category()) {
echo dgrs_get_comment_ratings($comment->comment_ID ;
}
?>


I use the same for a site but use the above to place the ratings field in only category X, so.....


<?php if (in_category('6')) {
echo dgrs_get_rating_fields();
}
?>


 
Thanks for the reply :)

I tried these two in comments.php but the review features do not display at all then;


Code:
<?php if (is_category()) {
echo dgrs_get_rating_fields();
}
?>



<?php if (is_category()) { ?>
<?php echo dgrs_get_rating_fields(); ?>
<?php } ?>
Any idea why?

chuckie
 
dont know works fine for me, I use the same plugin on one of my sites, the second example was copied and pasted directly from my comments.php file...
 
Maybe a different template issue?

Anyone else know?

I'll try asking on the Wordpress support.

Thanks anyway.

:yin-yang:
 
you can also try something like this

Code:
<?php if ( is_category() ): ?>
  <?php echo dgrs_get_rating_fields(); ?>
<?php endif; ?>
 
I have been searching everywhere for a theme that I could use this plugin with that is similar to the one displayed on his hosting review page. I am a novice when it comes to modifying wordpress themes and this plugin is just too nice.

If you come across one feel free to point me in the direction of it =)
 
I built this one and it turned out to be another one of those websites I lost interest in, Ill have to find the time to tie up the loose ends and finish it off..

host-rate.com

this is another good example of the plugin being used in specific categories only, take a look at the review sections..

gobassfishing.net

Its a great plugin that is very flexible, better than any other rating / review plugins Ive used before for WP.

Jer
 
host-rate.com is pretty nice...but the way he laid out awardwinninghosts.com is very nice

guess i'll have to look into hiring someone to style a theme similar to it
 
Status
Not open for further replies.