Add author function
This commit is contained in:
parent
08affa32b5
commit
f62c855128
|
|
@ -33,6 +33,11 @@ class WpApi
|
||||||
return $this->_get('posts', ['type' => 'page', 'filter' => ['name' => $slug]]);
|
return $this->_get('posts', ['type' => 'page', 'filter' => ['name' => $slug]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function author($name)
|
||||||
|
{
|
||||||
|
return $this->_get('posts', ['type' => 'page', 'filter' => ['author_name' => $name]]);
|
||||||
|
}
|
||||||
|
|
||||||
public function categories()
|
public function categories()
|
||||||
{
|
{
|
||||||
return $this->_get('taxonomies/category/terms');
|
return $this->_get('taxonomies/category/terms');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue