restoring loop_to_posts for compatibility