-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
I don't know whether it is because of my Code, The Client or Wordpress.
But i get always the last 10 posts wherever which limit is set.
And in this posts are the draft and published.
My Code:
function getLastNews($number = 1, $offset = 1)
{
$endpoint = "https://sub.domain.tld/xmlrpc.php";
$wpClient = new \HieuLe\WordpressXmlrpcClient\WordpressClient();
$wpClient->setCredentials($endpoint, 'OneOfMillionUser', 'myverystrongmysterysecretkey');
$return = $wpClient->getPosts(array('post_type' => 'post', 'post_status' => 'published', 'offset' => $offset, 'number' => $number, 'orderby' => 'date', 'order' => 'DESC'));
return $return;
}I think this is correct. It have works a long time(PHP 5.6, i work an the develop Machine with PHP 7). :/
Instead number I have numberposts and tried posts_per_page.
Metadata
Metadata
Assignees
Labels
No labels