Title: error with query_posts
Last modified: August 19, 2016

---

# error with query_posts

 *  [grosbouff](https://wordpress.org/support/users/grosbouff/)
 * (@grosbouff)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/error-with-query_posts/)
 * Hello, I have a problem with a plugin that does not want to make a query :
 *     ```
       class Folio_Newsticker {
       	function Folio_Newsticker($category='64') {
       		$temp_query = $wp_query;
       		query_posts('cat=64');
       ..............
       	}
       }
       $Folio_Newsticker = new Folio_Newsticker();
       ```
   
 * I get a
 * > Fatal error: Call to undefined function is_user_logged_in() in F:\web\AnimaV2\
   > public_html\wordpress\wp-includes\query.php on line 1332
 *  because of the `query_posts('cat=64');` line : if I remove it, it doesn’t crash.
 * Also,
 *     ```
       function Folio_Newsticker($category='64') {
   
       	if (!is_home()) {
       		return;
       	}
       ```
   
 * this don’t work and that’s strange because i’m in home !
 * Does anyone have an idea ?
 * Thanks !

The topic ‘error with query_posts’ is closed to new replies.

## Tags

 * [is_user_logged_in](https://wordpress.org/support/topic-tag/is_user_logged_in/)
 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * 0 replies
 * 1 participant
 * Last reply from: [grosbouff](https://wordpress.org/support/users/grosbouff/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/error-with-query_posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
