Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Getting current URL

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Dennis Dilmaghani
    #66079

    Hello,

    I believe after updating to a new version I am getting only a part of current URL of the search results page.

    For example,
    http://bestweave.org/?sfid=14046&_sfm_width=5+6&_sfm_height=7+8&_sfm_sale_price=0+36873
    gets only http://bestweave.org/?sfid=14046 when I am trying to e-mail results page. It was working fine before.

    Here is a function that I use for getting current page URL:
    global $wp;
    $url = add_query_arg( $wp->query_string, ”, home_url( $wp->request ) );

    Any idea on what can cause this problem?

    Thanks for your time!

    Trevor Moderator
    #66220

    Our forum parsing software might have mangled that, as in the middle you have one double quote mark, but it should be two singles.

    However, that method is not reliable for all query strings.

    AFAIK the recommended WordPress method is this:

    $url = home_url( add_query_arg( NULL, NULL ) );
    

    Assuming you want the full relative path included.

    Dennis Dilmaghani
    #66362

    It still gets only first part of URL ending with a Search form ID.

    Trevor Moderator
    #66368
    This reply has been marked as private.
    Dennis Dilmaghani
    #66371

    Thank you!

    Trevor Moderator
    #66420

    Well, we are not sure why the code did work and now does not, nor do we know if S&F is the cause. Nor can we think of any other way to get the URL (the plugin does not do that). The only thin I could find was this:

    http://stackoverflow.com/questions/6768793/get-the-full-url-in-php/8891890#8891890

    Other than that, we are out of ideas, sorry.

    Dennis Dilmaghani
    #66422

    Ok, thanks for your help anyway.

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.