Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TC.K

    (@wp_dummy)

    Yes, it is possible, but not easy. Have to editing the plugin file.

    Thread Starter aljuk

    (@aljuk)

    Hi, I’m part of the way there.

    In process.php line 135 I replaced:

    $query->query_vars['s'] = esc_html($keyword);

    with:

    $query->query_vars['s'] = esc_html($keyword);
    if(absint($query->query_vars['s'])) {
        // Set the post id value
        $query->set('p', $query->query_vars['s']);
        // Reset the search value
        $query->set('s', '');
    }

    This works. I have a couple of UI issues though:

    1. Let’s say I do a tax / custom field search. The search results page loads and the selected options in the QSF widget remain selected. Now I do a search by ID (string) using the text field. When the search results load, the options from the previous (taxonomy/custom field) search persist. Is there an easy mod I can make to have the QSF widget reset all tax/custom field selections to null/empty when a results set is returned from a search that is made by string?

    2. Let’s say I do a search by ID. How can I get the text in the input field to remain / persist when the search results page loads?

    Any clues or advice gratefully received!

    Plugin Author TC.K

    (@wp_dummy)

    Yes,
    Look for the plugin/html folder.

    1. Look for the corresponding file for tax or media field, cmfdropdown.php or taxdropdown.php (if it is dropdown field).

    2. look for searchform.php. In the <input id="awqsf_keyword" type="text" name="skeyword" value="" />
    Use $_get[‘skeyword’] for the input value.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘String search > Post ID ?’ is closed to new replies.