Remove Post Types selection from advanced search drop downs

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

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

Open Support Ticket
  • Author
    Posts
  • #419016

    Joanna
    Expired Member
    Post count: 157

    On the advanced search drop down options, one of them contains all of the post types including those I have elected to not display (on the screen shot All Places and Events are set to not show).

    How can I not show the post types drop down so the only those options from within each Post Type are searchable in the advanced search? e.g. on the screenshot, i only want to have Tourism Region, Search For and Near available. I don’t want to have the post types drop down.

    #419050

    Kor
    Moderator
    Post count: 16516

    Hi Joanna,

    I’d like you to know that you can always use custom CSS to hide any sections on the search form. Follow this article https://wpgeodirectory.com/docs/customizing-your-style/ and give it a try.

    Thanks!

    #419055

    Joanna
    Expired Member
    Post count: 157

    Awesome! thank you 😀

    How do I get the changes to stay?

    I make the change (setting them to hidden), move to a different CPT section, then go back and the changes i made are no longer there, and my changes are undone:

    .geodir-search .search_by_post {
    float: left;
    visibility: hidden;
    }

    #419118

    Kor
    Moderator
    Post count: 16516

    Hi Joanna,

    Please share the URL of the site in question so we can take a better look at it and also WP temp admin access to your site. You can post the details here using the private reply option below.

    #419144

    Joanna
    Expired Member
    Post count: 157
    This reply has been marked as private.
    #419147

    Alex Rollin
    Moderator
    Post count: 27815

    Hello Joanna,

    can you try this custom CSS and let us know if it is what you are after?

    
    
    
    .post-type-archive-gd_accommodation .geodir-listing-search select.search_by_post {
        float: left !important;
        display: none !important;
    }
    

    The rules above target one specific page, based upon the body class for the page. Each page may need treatment like that, or you can use body classes to write a rule that works for all the pages.

    When you use the tools inspector, scroll the code view up until you see the body class and can pick and choose a selector that works for your purposes.

    #419197

    Joanna
    Expired Member
    Post count: 157

    I tried that but the changes still didn’t take effect. not sure what’s overwriting it

    #419228

    Alex Rollin
    Moderator
    Post count: 27815

    You can try clearing your browser cache to see if that helps.

    #419256

    Joanna
    Expired Member
    Post count: 157

    tried readding to appearance > editor and opened in an incognito window. working perfectly now. Thank you!!!

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