Support » Fixing WordPress » How to remove query strings

  • I tried to use this code but its not working. What am I doing wrong or give someone give me a difference code?

    function remove_querystring_var($url, $key) {
    $url = preg_replace(‘/(.*)(\?|&)’ . $key . ‘=[^&]+?(&)(.*)/i’, ‘$1$2$4′, $url . ‘&’);
    $url = substr($url, 0, -1);
    return ($url);

Viewing 5 replies - 1 through 5 (of 5 total)
  • Is this not resolved in your many posts about this?

    Im still posting so I guess not. The codes isnt working. I put this code in and its not working so could you provide another method or help fix this code. I put it in my function.php file and nothing happen

    This exact issue has been posted somehow several times here…summer is over here – we will catch up

    I read them and no results, why did you even come and post anything? waste of time. You can keep comments to yourself. I didnt post to hear nothing but some good advise for the question I post. not you talking about we’ll catch up.

    I have resolved very many issues here. I choose to do this as a voluntary member here. I do not have to wait and watch a lack of moderation at this forum. Please actually review the time it would take to provide this help, be thankful, and instead of re-posting the same issue that is NOT understood, ask for more help…Thank you.

    [ Links to website and profile moderated. The links are already in your sidebar ]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove query strings’ is closed to new replies.