Disable reviews for a CPT

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

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

Open Support Ticket
  • Author
    Posts
  • #497276

    Anna
    Full Member
    Post count: 70

    Hello

    I want to remove the option to leave reviews for a particular CPT. I’ve tried using the CSS from https://wpgeodirectory.com/docs/common-styling-examples/#cpt-reviews and changing the CPT extension to the one I’m trying to target but it didn’t work for me.

    I’ve also tried the CSS from https://wpgeodirectory.com/support/topic/remove-reviews-for-cpt-on-supreme-directory/ but didn’t have any luck with that either.

    Any help overcoming this would be great! 🙂

    Thanks
    Matt

    #497277

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #497308

    Alex Rollin
    Moderator
    Post count: 27815

    Did you try removing the review tab in the tabs UI for that CPT?
    https://wpgeodirectory.com/docs-v2/places/tabs/

    #497310

    Anna
    Full Member
    Post count: 70

    Hi Alex, yes I tried that.

    #497331

    Alex Rollin
    Moderator
    Post count: 27815

    https://wpgeodirectory.com/docs-v2/templates/archive-item/

    If that is the CPT listing page and you mean the rating in the archive item, then, create a new archive item for that post type and copy the default content, but then remove the gd_post_rating shortcode when you save.

    https://wpgeodirectory.com/docs-v2/faq/common-examples/#ratings

    #498109

    Anna
    Full Member
    Post count: 70

    Sorry Alex, I don’t understand what you mean. How do I create a new archive item for a particular CPT? Forgive me if it’s a dumb question, I’m having trouble getting my head around it atm…

    Cheers

    #498114

    Anna
    Full Member
    Post count: 70

    Hi Alex, after a bit of experimenting I think I’ve figured out how to remove the reviews/stars/comments from the CPT.

    I used this css:

    .single-gd_comm_govt .sd-ratings {display: none;}
    .post-type-archive-gd_comm_govt .geodir-post-rating {display: none;}
    .single-gd_comm_govt .geodir-comments-area {display: none;}

    #498120

    Kor
    Moderator
    Post count: 16516

    Hi Matt,

    Thanks for letting us know. Do you still require any assistance?

    #498122

    Anna
    Full Member
    Post count: 70

    Hi Kor, no it’s all good now. I just wanted to post it in the thread if someone else is having the same problem in the future.
    Cheers

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