This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • robratliff85robratliff85
    Participant

    Here’s what I’ve tried using the code you sent, but it still treats x400 like searching for x400
    /* Replace Keywords */

    add_filter( ‘asp_query_args’, ‘asp_replace_search_keywords’, 10, 2 );
    function asp_replace_search_keywords( $args, $id ) {
    /**
    * Add as many words as you want. On the left side place the
    * word or words separated by comma to replace.
    * To the right side, place the single word to replace it with.
    */
    $replace = array(
    ‘x400’ => ‘x-400’, // Replace ‘word1’ with ‘word2’
    ‘x600m, x-600-m’ => ‘x-600m’, // Replace ‘word3’ and ‘word4’ with ‘word5’
    );

    // —————————————-
    // Do not change anything below this line
    // —————————————-
    foreach ( $replace as $k => $w ) {
    $kr = explode(‘,’, $k);
    foreach ($kr as $krk => &$krv) {
    $krv = trim($krv);
    if ( $krv == ” ) {
    unset($kr[$krk]);
    } else {
    $krv = ‘/\b’ . $krv . ‘\b/u’;
    }
    }
    if ( count($krv) > 0 ) {
    $args[‘s’] = preg_replace($kr, $w, $args[‘s’]);
    }
    }
    return $args;
    }

    robratliff85robratliff85
    Participant

    The top menu doesn’t fit correctly for the following 2 pages, but only when ajax pro search is activated. Once I deactivate ajax search pro, the page looks correct. If you give me your email, I’ll set you up with a username and password.

    http://kelvinf1.sg-host.com/level-monitoring/float-sensors/
    http://kelvinf1.sg-host.com/level-monitoring/pressure-sensors/

    robratliff85robratliff85
    Participant

    One other thing you could help with. When you search for something on the search page once it’s already loaded, the results come up blank, meaning they are there and if you hover over and click on the blank space it will take you to one of the search results pages, but you just can’t see the results. Try searching for something on the search results page, but don’t hit the return key.

    robratliff85robratliff85
    Participant

    Also, thank you for the search results page fix. Now I’m wondering if we can make the results window taller? It’s only tall enough to show about 4 results.

    robratliff85robratliff85
    Participant

    Is there a way to force x400 to look for x-400 and x600 to search for x-600 etc. The reason is that removing the – only caused the x-400 to now search for x400 and x400 is the keyword not working properly. But if I can force x400 to search for x-400 the the search will deliver the right results.

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