Any way to remove pinpoint and review stars but for a particular CPT

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

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

Open Support Ticket
  • Author
    Posts
  • #338560

    Tom Rendle
    Buyer
    Post count: 46

    https://wpgeodirectory.com/support/topic/how-can-i-remove-reviews-and-pinpoint-from-listings/

    This thread gave me code to get rid of it altogether but I would prefer to only get rid them when searching for a particular CPT

    #338561

    Tom Rendle
    Buyer
    Post count: 46
    This reply has been marked as private.
    #338631

    Guust
    Moderator
    Post count: 29970

    Can you be more specific?
    Where do you want to remove what?
    So you only want the favorite icon and review icons removed from the search result page, but not from the Listings or Detail pages?

    #338634

    Tom Rendle
    Buyer
    Post count: 46

    I have two membership types, buyers and sellers. The sellers can list their business listing and the buyers can post a proposal to get quotes. The business listings can have reviews and the favorite and pinpoint things but I don’t want reviews for the project proposals. I have removed the reviews tab from the details section for the project proposals. Now I just need to remove the pinpoint, stars and favorite icons from the listing page based for the project proposals as well. I also have a “completed systems” CPT which is essentially the same as the project proposals, doesn’t need to be reviewed.

    #338655

    Guust
    Moderator
    Post count: 29970

    I cannot see favorites or review links on the listings page for /project-proposal/
    I guess you fixed it already?

    Please provide URLs if there is still anything to be looked at. Thanks

    #338661

    Tom Rendle
    Buyer
    Post count: 46

    I just did the fix for all categories for now. I still need to set it so that it only shows the pinpoint and such for gd_solar_installer. I just have the code in my child theme’s functions and I put the login above. To reiterate I used the code in the very first link posted to remove them from all CPT’s.

    #338663

    Guust
    Moderator
    Post count: 29970

    You said “I have removed the reviews tab from the details section for the project proposals” so I assumed that was only for that CPT.
    I’ll have a look now then.

    #338667

    Guust
    Moderator
    Post count: 29970

    How’s that?
    Just de-activated the PHP code and added some CSS at GD > Design > Scripts.

    #338945

    Tom Rendle
    Buyer
    Post count: 46

    Are you referring to this? .single-gd_project_proposal dl.geodir-tab-head [data-tab=”#reviews”] {
    display:none;
    }

    So this gets rid of the reviews tab on project proposals in a more efficient way? Can this be extended to all CPT’s except for Solar_Installers?

    Also, the code which I have in my child theme’s stylesheet is as follows (it gets rid of pinpoint etc for all cpt’s), only thing is that – like the reviews tab – I still want this to display for Solar Installers, just not any other CPT at this time, is that possible?

    .geodir_rating {
    display:none;
    }
    .geodir-pinpoint-link {
    display:none;
    }
    .geodir-pinpoint {
    display: none !important;
    }
    .geodir-pcomments {
    display:none !important;
    }
    .geodir-rating .geodir_Star img {
    display:none !important;
    }
    .geodir-addtofav {
    display:none !important;
    }

    Thanks for your help!

    #339142

    Guust
    Moderator
    Post count: 29970

    Look at the body classes of a detail page, you will find a CPT specific CSS class.
    In this case it is .single-gd_project_proposal
    So by changing that to .single-gd_place etc, you can target different CPT detail pages.

    You need to target the other things the same way, for example

    
    
    .gd-post-gd_place .geodir-rating {
    display:none;
    }

    hides only the stars for gd_place listings.

    This will help you pinpoint the classes and code: .
    https://wpgeodirectory.com/docs/customizing-your-style/

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

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

Open Support Ticket