python wordpress xmlrpc custom fields

Solutions on MaxInterview for python wordpress xmlrpc custom fields by the best coders in the world

showing results for - "python wordpress xmlrpc custom fields"
Neele
06 Feb 2019
1widget.custom_fields = [
2    {
3        'key': 'job_location',
4        'value':  'Newyork'
5    }, 
6    {
7        'key': 'job_listing_category',
8        'value':  'hotel'
9    }
10]
11
Pedro
15 Mar 2019
1
2my_blog = Client('http://myblog.com/xmlrpc.php','Username','Password')
3myposts=my_blog.call(posts.GetPosts())
4post.custom_fields = [{
5                'key': 'slug_1',
6                'value': 'This is what you want to put inside the section'
7                        },
8                {
9                'key':'slug_2',
10                'value': 'this is where you put another thing'
11                               },
12                {
13                'key': 'slug_3',
14                'value': 'this is where you put another thing'
15                        },
16post.id = my_blog.call(posts.NewPost(post))
17post.post_status = 'publish'
18my_blog.call(posts.EditPost(post.id, post)
19
Giulio
24 Jun 2018
1from wordpress_xmlrpc import Client, WordPressPost
2from wordpress_xmlrpc.methods.posts import GetPosts
3from wordpress_xmlrpc.methods import posts
4from wordpress_xmlrpc import WordPressTerm
5from wordpress_xmlrpc.methods import taxonomies
6
7wp = Client('http://127.0.0.1/15wp/xmlrpc.php', 'admin', '123456')
8
9# now let's create a new product
10widget = WordPressPost()
11widget.post_type = 'job_listing'
12widget.title = 'Widgetlast02'
13widget.content = 'This is the widgets description.'
14widget.post_status = 'publish'
15widget.custom_fields = []
16widget.custom_fields.append({
17        'job_location': 'Newyork',
18        'job_listing_category':  'hotel'
19})
20widget.id = wp.call(posts.NewPost(widget))
21