public function __construct(ffWPLayer $WPLayer) { $this->_WPLayer = $WPLayer; if (!$WPLayer->in_the_loop()) { $WPLayer->the_post(); $WPLayer->rewind_posts(); } }