Title: WP Function returns wrong results
Last modified: July 12, 2020

---

# WP Function returns wrong results

 *  Resolved [meksONE](https://wordpress.org/support/users/meksone/)
 * (@meksone)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp-function-returns-wrong-results/)
 * Hi, i’ve used this plugin some time ago without problems; now I need it again
   but I’ve noticed a strange behavior… even on a fresh WP without plugins, if I
   run a simple test like this:
    $test = is_home(); return $test; on the homepage,
   it returns FALSE.
 * I’m missing something? Where I’m wrong?
    Thanks!
    -  This topic was modified 5 years, 10 months ago by [meksONE](https://wordpress.org/support/users/meksone/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Fulvio Notarstefano](https://wordpress.org/support/users/nekojira/)
 * (@nekojira)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wp-function-returns-wrong-results/#post-13182779)
 * is_home() is returning correctly false because you are not on the homepage, the
   WP_Query object it is tied to understands that. You are calling this function
   from the console context, and it cannot be used in this way. Functions that depend
   on some WordPress states or globals, will not behave as if you were inside the
   WordPress loop.
    -  This reply was modified 5 years, 10 months ago by [Fulvio Notarstefano](https://wordpress.org/support/users/nekojira/).

Viewing 1 replies (of 1 total)

The topic ‘WP Function returns wrong results’ is closed to new replies.

 * ![](https://ps.w.org/wp-php-console/assets/icon-256x256.png?rev=1070278)
 * [WP PHP Console](https://wordpress.org/plugins/wp-php-console/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-php-console/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-php-console/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-php-console/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-php-console/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-php-console/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Fulvio Notarstefano](https://wordpress.org/support/users/nekojira/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/wp-function-returns-wrong-results/#post-13182779)
 * Status: resolved