Created
February 24, 2024 00:38
-
-
Save mshannaq/0d191816c9362a09f39625cfa69a7c2d to your computer and use it in GitHub Desktop.
wordpress api new post example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
مثال علي استخدام | |
wordpress api | |
لانشاء مقال جديد | |
مثال | |
curl -X POST \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Basic YWRtaW46eW91ci1hcHBsaWNhdGlvbi1wYXNzd29yZA==" \ | |
-d '{ | |
"title": "New Post Title", | |
"content": "This is the content of the new post.", | |
"status": "publish" | |
}' \ | |
https://your-wordpress-site.com/wp-json/wp/v2/posts | |
مع تبديل ال authorization | |
راجع | |
https://developer.wordpress.org/rest-api/ | |
للمزيد حول استخدام | |
wordpress api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment