Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

xmlrpc get all posts

# get pages in batches of 20
offset = 0
increment = 20
while True:
        posts = client.call(posts.GetPosts({'number': increment, 'offset': offset}))
        if len(posts) == 0:
                break  # no more posts returned
        for post in posts:
                do_something(post)
        offset = offset + increment
Source by python-wordpress-xmlrpc.readthedocs.io #
 
PREVIOUS NEXT
Tagged: #xmlrpc #posts
ADD COMMENT
Topic
Name
7+7 =