• Resolved antimine

    (@antimine)


    hello.
    Thanks for providing a great plugin.

    There is one problem.
    The theme I use is changing the search URL.

    The code is below:

    function fb_change_search_url_rewrite() {
    if ( is_search() && ! empty( $_GET[‘s’] ) ) {
    wp_redirect( home_url( “/search/” ) . urlencode( get_query_var( ‘s’ ) ) );
    exit();
    }
    }
    add_action( ‘template_redirect’, ‘fb_change_search_url_rewrite’ );

    Then, the number of searches for the search term will be counted twice.
    I’d like to know a solution to this.

    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi,

    Thank you for reaching out.

    You might want to look at the plugin settings and search for Exclude doubled search for same user if interval is lower than ( minutes ) then make this value higher than 0. In your case even 1 should be enough.

    What this setting does is, imagine someone searching for something and then refreshing the page a few times. With the default setting of 0 it will record a search for each research. Increasing it to 1, will only register the identical search term once per minute.

    Let me know if that makes sense and if it solves the problem for you.

    Thank you,
    Cornel Raiu

    Thread Starter antimine

    (@antimine)

    Wow, it’s perfect.
    It works.
    thank you!!

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    I’m glad we were able to solve this so fast!

    If you find my plugin useful and you enjoy using it, please post a review. This keeps me going on providing useful tools and support for everyone using my plugin.

    Thank you for using my plugin,
    Cornel Raiu

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search URL Rewrite and the search term will be counted twice.’ is closed to new replies.