Advanced search not working for CPT

This topic contains 16 replies, has 3 voices, and was last updated by  Stiofan O’Connor 8 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #386716

    Louise Boland
    Free User
    Post count: 9

    I’ve set-up a CPT and have three advanced search fields set-up, but one of them isn’t working.

    The two that are working are ‘search by distance’ and ‘search by category’, but the third is a series of checkboxes and if I select 1 of the checkboxes that I know exists in the CPT, the search results still show all results, even though only one of them (the one with the checkbox selected) should actually appear.

    #386763

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    normally that happens when another plugin is interfering with GD search queries.

    Please provide a link and admin credentials in a private reply and we will look into it.

    Thanks

    #386797

    Louise Boland
    Free User
    Post count: 9
    This reply has been marked as private.
    #386916

    Paolo
    Site Admin
    Post count: 31211

    Hi Louise,

    I don’t see any of the plugin that are known to cause issues to the search form.

    I asked to the developers to have a look and let us know,

    Thanks

    #386935

    Louise Boland
    Free User
    Post count: 9

    Thanks. We can confirm that too, as we just deactivated all plugins except the GeoDirectory ones and the advanced search still doesn’t work.

    We’re aiming to launch our new website tomorrow, so we’re really keen to have this issue resolved asap.

    #386939

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I don’t see any problems off hand, can you provide FTP info and i’ll debug this.

    Thanks,

    Stiofan

    #386949

    Louise Boland
    Free User
    Post count: 9
    This reply has been marked as private.
    #386952

    Louise Boland
    Free User
    Post count: 9
    This reply has been marked as private.
    #386960

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    It’s something to do with your theme, i am checking now, 5 minz…

    Stiofan

    #386963

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have added the below code snippet to fix the search with your theme

    
    
    add_action( 'after_setup_theme', '_my_fix_gd_search' ); 
    function _my_fix_gd_search(){
    if(isset($_REQUEST['geodir_search'])){
      remove_filter('pre_get_posts', 'magup_searchfilter');
    }
    }

    Thanks and good luck with your launch tomorrow 🙂

    Stiofan

    #386976

    Louise Boland
    Free User
    Post count: 9

    Thanks Stiofan! Everything is working!

    #387056

    Louise Boland
    Free User
    Post count: 9

    We’ve just migrated the site ready for launch and we’ve got a problem with the Geo Directory! None of the CPTs (including the original ‘places’) have come across to the new server.

    The migration process was done by taking a backup of the database via phpmyadmin, find and replace on the database file for new domain, then import to new server.

    The whole site is working fine except for the Geo Directory CPTs!!

    We’re desperate to go live today, so please could you help asap?

    #387057

    Paolo
    Site Admin
    Post count: 31211

    How did you do search and replace on the database?

    If you didn’t use something like better search and replace plugin, you broke serialized options.

    Let us know,

    #387058

    Louise Boland
    Free User
    Post count: 9

    We opened the sql file in text edit (plain text) on a Mac and ran the find and replace from there.

    #387059

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yeah “that’s your problem” 🙂
    You have serialized data which is length specific..

    Do it again but only replace two items in the DB file
    1. site_url
    2. home
    These will likely be the first couple of options in the wp_options table.

    Then u will be able to get in to the site, donwload the plugin “Better search replace” then use that to search for the old url and repalce with the new url, then save your permalinks options to clear any permalink cache and you should be good to go.

    Let us know if u have any probelms.

    Thanks,

    Stiofan

Viewing 15 posts - 1 through 15 (of 17 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount