Search Bar Search Filter(s)

This topic contains 5 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #513863

    Steve
    Full Member
    Post count: 1019

    I have 4 Cpt’s.

    Can I modify the search bar in a way as to “excluded all EXCEPT” one cpt?

    I seen this on a search filter page

    “Removing one CPT only from the Custom Post Type (CPT) selector
    This CSS will hide one CPT from the CPT selector everywhere (adjust as required):

    1 .search_by_post option[value=gd_event] {display: none;}”

    Which, if I am understanding is excluding just 1 cpt. Is there a corresponding shortcode.

    So, if I wanted to create a Search for Bands page I would create the page and insert css .search_by_post option[value=gd_bands

    #513865

    Alex Rollin
    Moderator
    Post count: 27815

    It might be easier to set the default CPT and then hide the CPT selector. Why show it if you don’t want people to use it?

    https://wpgeodirectory.com/docs-v2/design/gd_search/

    
    
    
    [gd_search post_type="gd_place" post_type_hide="1"]
    
    #513866

    Steve
    Full Member
    Post count: 1019

    Cool. But, not sure I got it. If I “many” cpts, would I use the same “hide=”1”] ? Or, does the “1” represent the post number that is being hiddeen, thus I would add a comma and the number of the posts?

    Thanks much Alex Rollin.

    #513870

    Steve
    Full Member
    Post count: 1019

    Ok, I got it. I had to tick the icon to get the other post types to display. Way Cool!!!!

    Regards,

    #513871

    Steve
    Full Member
    Post count: 1019

    Ok, one more detai. I need for the “category” search included too please?

    Regards,

    #513890

    Alex Rollin
    Moderator
    Post count: 27815

    Guide for adding category to the search bar: https://wpgeodirectory.com/docs-v2/addons/advanced-search/#select

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

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

Open Support Ticket