I'm working some API. Core is WordPress. Okay, let me paste a sample:


$roll= esc_attr($_GET['roll']);

if ( $roll != "" ) {

$args = array(
    'meta_key'     => 'std_roll',
    'meta_value'   => $roll,

$blogusers = get_users($args);
    foreach ($blogusers as $user) {
        echo '<li>' . $user->user_login . '</li>';


This is working in FF, Chrome completely. But in IE, error 404 not found error. Same in .NET (in HttpWebRequest), and android (HttpGet) also.

When I moved the code in WordPress theme ( a page template), everything was working fine.

What was the problem and how that can be fixed?


Just because you see something in the browser doesn't mean you don't get a 404. Browsers will display content of of a 404 page (if there is content) when it is longer then a browser specific length. It might be that IE requires longer length then the other browsers.

Why do you get a 404? hard to know without more detail about your setup but most likely the $_SERVER variable is not setup in a way wordpress expects for its configuration. Make sure all the URL related keys are filled correctly.

| improve this answer | |

I was solved using

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.