Limit reviews to 1 per user per post?

This topic contains 6 replies, has 3 voices, and was last updated by  Giri 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #65646

    bearex
    Expired Member
    Post count: 29

    Hello, i have seen, that on WHOOP, there is an option to limit user comments to 1 comment per user per post. I was wondering if this is also possible here?
    Thank you

    I tried placing this in the comments.php section, but didnt work:

    
    
    
    <?php
    global $current_user;
    $args = array('user_id' => $current_user->ID);
    $usercomment = get_comments($args);
    if(count($usercomment) >= 1){
    	echo 'disabled';
    } else {
    	comment_form();
    }
    ?>
    

    Thank you

    #65707

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you should never alter a core file, or you’ll get in trouble everytime an update is released.

    I’ll ask to the Whoop developer if he can give us a pointer on the best way to do this the right way.

    Thanks

    #65802

    Giri
    Expired Member
    Post count: 3155

    I was wondering if this is also possible here?

    Can you explain, what are you trying to do?

    #65835

    bearex
    Expired Member
    Post count: 29

    Hey, i am trying to limit registered users, so they can only post 1 review on each listing. Thanks

    #65842

    Giri
    Expired Member
    Post count: 3155

    That option already available in whoop. Please enable this setting.

    whoop options -> Review settings -> Limit 1 Review / User / Post
    #65844

    bearex
    Expired Member
    Post count: 29

    Yes, but i wanted this option in other theme, not whoop. Just when using geodirectory in general. Thank you

    #65846

    Giri
    Expired Member
    Post count: 3155

    In that case, I think its better if you hire a developer from here.

    Because its not that simple. We have created custom callback function (geodir_comment_whoop) to format whoop comments. if you need that option, you have to create a callback function too. If you are not a developer then its wise to hire a developer.

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket