From 4d622a8afef21dbac6b977a46f4483a8b41d6369 Mon Sep 17 00:00:00 2001 From: Page Wood Date: Sat, 3 Mar 2018 12:58:27 -0500 Subject: [PATCH] add ability to set offset in taxonomy query --- Query.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Query.php b/Query.php index 621a63a..4a577a3 100644 --- a/Query.php +++ b/Query.php @@ -94,6 +94,17 @@ public function taxonomy($taxonomy) return $this; } + public function offset($offset) + { + if (is_int($offset)) { + $this->setQueryVar('offset', $offset); + } else { + throw new InvalidArgumentException(); + } + + return $this; + } + public function orderBy($orderby = 'name', $order = 'ASC') { $this->setQueryVar('orderby', $orderby);