WordPress.org

Ready to get started?Download WordPress

Forums

error with query_posts (1 post)

  1. grosbouff
    Member
    Posted 6 years ago #

    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 !

Topic Closed

This topic has been closed to new replies.

About this Topic