Trading Software > Help Desk > Knowledgebase

Search help:

XML-RPC metaWeblog.newPost


2019-10-18: Created


Describes the arguments and return value of XMLRPC calls using XmlRpcMethod("metaWeblog.newPost") 



Function: Creates a new post on your blog.



  • Blog ID – For use in multisite installations, typically 0 for single sites
  • Username – WordPress username
  • Password – WordPress password
  • Content – Your blog post defined as an associate array with the following fields
    • ‘post_type’ – ‘post’ or ‘page’
    • ‘wp_slug’ – Post slug (optional)
    • ‘wp_password’ – Post password (optional)
    • ‘wp_page_parent_id’ – ID of the parent post (optional)
    • ‘wp_page_order’ – Menu order (optional)
    • ‘wp_author_id’ – Identify an author other than the user posting the request (optional)
    • ‘title’ – Post title
    • ‘description – Post body content
    • post-type_status – Set the post/page/custom status to draftprivatepublishpublish, or pending
    • ‘mt_excerpt’ – Post excerpt
    • ‘mt_text_more’ – Text for the Read More link
    • ‘mt_keywords’ – Tags
    • ‘mt_allow_comments’ – Set whether comments are open or closed
    • ‘mt_allow_pings’ – Same settings as ‘mt_allow_comments’
    • ‘mt_tb_ping_urls’ – An array of the URLs you want to ping on publication
    • ‘date_created_gmt’ – The publication date for the post
    • ‘dateCreated’ – Same as above … use one or the other
    • ‘categories’ – An array of categories for the post.
    • Publish – The status you want the post to have, either publish or draft

Returns: ID of the post you just created

Was this article helpful? yes / no
Related articles XML-RPC metaWeblog.getPost
XML-RPC metaWeblog.getRecentPost
XML-RPC metaWeblog.editPost
Adding a Blog Post
XML-RPC metaWeblog.getCategories
Article details
Article ID: 243
Category: Wordpress
Rating (Votes): Article rated 3.2/5.0 (18)

« Go back

Powered by Help Desk Software HESK, in partnership with SysAid Technologies