• Hi,

    Thank you for this awesome plugin. I was just wondering if it’s possible to add content to custom created fields using xmlrpc? I am able to add to taxonomies created, change to a custom post type but not to custom fields created/meta box fields.

    Any help is very much appreciated.

    Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter questionsolutions

    (@aliquam)

    @gabrielberzescu Thank you very much. I did end up figuring it out, for anyone else that might come across this, here is what I did using python.

    You need to use the custom_fields and it’s set up as a dictionary. So an example would look like this. The slugs are found inside the WCK plugin for the ones you created.

    
    my_blog = Client('http://myblog.com/xmlrpc.php','Username','Password')
    myposts=my_blog.call(posts.GetPosts())
    post.custom_fields = [{
                    'key': 'slug_1',
                    'value': 'This is what you want to put inside the section'
                            },
                    {
                    'key':'slug_2',
                    'value': 'this is where you put another thing'
                                   },
                    {
                    'key': 'slug_3',
                    'value': 'this is where you put another thing'
                            },
    post.id = my_blog.call(posts.NewPost(post))
    post.post_status = 'publish'
    my_blog.call(posts.EditPost(post.id, post)
    

    Good luck!

    Thanks @aliquam

    We appreciate this — cheers!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding content to custom fields using xmlrpc’ is closed to new replies.