Removing reviews for specific payment package

This topic contains 8 replies, has 2 voices, and was last updated by  Guust 5 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #445976

    Helen Leach
    Lifetime Member
    Post count: 42

    Morning Oh-wise-ones,
    I have just been following the advice from https://wpgeodirectory.com/support/topic/disable-reviews-by-prices-and-payments-package-type/

    And am adding the code to the child functions.php

    // add the package id to the body
    add_filter( ‘body_class’, ‘my_add_package_class’,10,1 );
    function my_add_package_class($class){
    global $post;
    if (geodir_is_page(‘detail’) && isset($post->package_id)) {
    $class[] = “gd-package-id-“.$post->package_id;
    }
    return $class;
    }

    .gd-package-id-2 #reviewsTab {display: none !important;}

    and it states that there is a syntax error, unexpected ‘.’ in the last line…

    As you can tell I am not very techie with this so any help with this will be gratefully received 🙂

    Cheers,
    Helen

    #445979

    Guust
    Moderator
    Post count: 29970
    .gd-package-id-2 #reviewsTab {display: none !important;}

    is CSS code and belongs in a CSS plugin or other CSS option of your theme or plugin. It is not PHP, so should not go in your functions.php file.

    Thanks

    #445984

    Helen Leach
    Lifetime Member
    Post count: 42

    Hi Guust,
    Oh yes, of course! Very numpty moment there… So I have popped that CSS into Appearance-Customize-Additional CSS but it is still not hiding the reviews tab for this particular price package…

    #445985

    Helen Leach
    Lifetime Member
    Post count: 42
    This reply has been marked as private.
    #445987

    Guust
    Moderator
    Post count: 29970

    Please change all curly quotes to straight quotes. Let us know.

    #445988

    Helen Leach
    Lifetime Member
    Post count: 42

    I tried that and it didn’t like it…

    #445992

    Guust
    Moderator
    Post count: 29970

    I moved the snippet to Code Snippets and corrected the quotes.
    Also added CSS at GD > Design > Scripts:

    
    
    .gd-package-id-2 #reviewsTab {display: none !important;}
    .gd-package-id-2 [data-tab="#reviews"] {display:none !important;}

    Please check now.

    #445993

    Helen Leach
    Lifetime Member
    Post count: 42

    Guust, you are the BEST!!

    Worked like a charm 🙂

    I tell you what, you guys are the brilliant and GD is a great plugin. Keep up the amazing work 🙂

    #446002

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

    I tell you what, you guys are the brilliant and GD is a great plugin. Keep up the amazing work 🙂

    Thanks 🙂 Don’t only tell us, tell the world 🙂 at the WordPress plugin page 🙂

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

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

Open Support Ticket