Disable reviews for a CPT

This topic contains 8 replies, has 3 voices, and was last updated by  Matt 2 days, 22 hours ago.

  • Author
    Posts
  • #497276

    Matt
    Full Member
    Post count: 50

    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

    Matt
    Full Member
    Post count: 50
    This reply has been marked as private.
    #497308

    Alex Rollin
    Moderator
    Post count: 18389

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

    #497310

    Matt
    Full Member
    Post count: 50

    Hi Alex, yes I tried that.

    #497331

    Alex Rollin
    Moderator
    Post count: 18389

    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

    Matt
    Full Member
    Post count: 50

    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

    Matt
    Full Member
    Post count: 50

    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: 13125

    Hi Matt,

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

    #498122

    Matt
    Full Member
    Post count: 50

    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)

You must be logged in to reply to this topic.