Can't Save Advanced Search Fields


  • Amy
    Newbie 7 points
    January 22, 2016 at 9:33 pm

    I am using the Directory Theme and I have followed the video tutorial on Search Setup, but my new search queries are not saving. When I save them, instead of keeping them, the page just resets to the default of Keyword search.


  • Janak
    Super Guru 1,283 points
    January 23, 2016 at 9:18 am

    Amy, did you set up a fresh install without sample data and is the Keyword element the only one on the page? If so I had a similar problem – let me know and I’ll let you know how I fixed it.


  • Amy
    Newbie 7 points
    January 23, 2016 at 1:18 pm

    Yes, that is correct. A fresh install with no sample data.


  • Janak
    Super Guru 1,283 points
    January 23, 2016 at 3:27 pm

    Ok, here’s what to do:

    1. Make a copy of you functions.php file and add this code to the end of it but above the closing ?>.

    $wpdb->query(“CREATE TABLE IF NOT EXISTS".$wpdb->prefix."core_search (
    id int(11) NOT NULL AUTO_INCREMENT,
    label varchar(50) NULL,
    description varchar(100) NULL,
    type varchar(10) NULL,
    operator varchar(10) NULL,
    compare varchar(10) NULL,
    values text NULL,
    key varchar(20) NULL,
    alias varchar(20) NULL,
    field_type varchar(15) NULL,
    order smallint(2) NULL,
    link varchar(100),
    PRIMARY KEY (id)
    )”);

    2. Rename the functions.php file in the wp-content/thmes/DT folder on your server to a say SAVEfunctions.php and upload the modified version.

    3. Go to Search Setup and make one mod – even just change the label on the Keyword element and Save. It should work this time.

    4. Now you can delete the modified functions.php file from server and rename your old one back in.

    It should all be fine now, you just need that modified functions file to do the first save.

    If you aren’t technical enough to do this then raise a ticket and just state the problem and what I’ve said and Mark will recognise the problem as he gave me this info. They will do it for you.

    This reply was awarded the best answer by the topic poster.

  • Amy
    Newbie 7 points
    January 23, 2016 at 8:13 pm

    I think I can do this. If not, I’ll start a ticket. Thanks much!


  • Janak
    Super Guru 1,283 points
    January 24, 2016 at 11:32 am

    No problem Amy. If you have any problems I can post the file for you here.


  • Josh
    Super Guru 13,875 points
    January 25, 2016 at 5:38 pm

    Thanks for sharing Janak 🙂


  • Amy
    Newbie 7 points
    April 1, 2016 at 10:48 pm

    So, I see that this is out of date, but its still an issue that I’m having. I tried updating the functions.php file but had trouble with it. Since this is out of date, what is the new solution?


  • Janak
    Super Guru 1,283 points
    April 2, 2016 at 7:59 am

    Amy, the solution is still the same.

    I read on another thread it may be fixed in the next release but until it is this the way to fix it.


  • Josh
    Super Guru 13,875 points
    April 4, 2016 at 1:38 pm

    Hello Amy,
    Please open a ticket if still having the issue >>https://s.premiumpress.com/index.php?/Tickets/Submit


  • Kumar
    Newbie 1 points
    January 2, 2017 at 1:58 pm

    I tried by going to Theme Setup->Toolbox->Database Tables->Re-install Missing Tables.

    And then I went to search page and I tried adding taxanomy and it got saved.

    Note: Take necessary backups before you do this.


  • Josh
    Super Guru 13,875 points
    January 3, 2017 at 12:39 pm

    Thanks for sharing 🙂

  • Dinesh
    Dinesh
    Newbie 45 points
    June 21, 2017 at 8:26 pm

    Which is the best method to fixing this issue?


  • Josh
    Super Guru 13,875 points
    June 22, 2017 at 1:07 pm

    Hello Dinesh,
    Best option is to reinstall missing tables.
    Theme Setup >Toolbox >Database Tables >Re-install Missing Tables.

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

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes