Horje
python-wordpress-xmlrpc custom fields Code Example
python-wordpress-xmlrpc custom fields
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import GetPosts
from wordpress_xmlrpc.methods import posts
from wordpress_xmlrpc import WordPressTerm
from wordpress_xmlrpc.methods import taxonomies

wp = Client('http://127.0.0.1/15wp/xmlrpc.php', 'admin', '123456')

# now let's create a new product
widget = WordPressPost()
widget.post_type = 'job_listing'
widget.title = 'Widgetlast02'
widget.content = 'This is the widgets description.'
widget.post_status = 'publish'
widget.custom_fields = []
widget.custom_fields.append({
        'job_location': 'Newyork',
        'job_listing_category':  'hotel'
})
widget.id = wp.call(posts.NewPost(widget))
python-wordpress-xmlrpc custom fields
widget.custom_fields = [
    {
        'key': 'job_location',
        'value':  'Newyork'
    }, 
    {
        'key': 'job_listing_category',
        'value':  'hotel'
    }
]




Python

Related
calculate pearson's r | calculate graph correlation Code Example calculate pearson's r | calculate graph correlation Code Example
Local to ISO 8601 without microsecond: Code Example Local to ISO 8601 without microsecond: Code Example
python clean all .pyc Code Example python clean all .pyc Code Example
sqlite to python list Code Example sqlite to python list Code Example
float round python Code Example float round python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7