public static function defaultPost() { global $wp_query; if(isset($wp_query->posts[0])) { $tpost=new self; $tpost->loadPost($wp_query->posts[0]); $tpost->setAsCurrentPost(); return $tpost; } else return NULL; }