Skip to content

Instantly share code, notes, and snippets.

@mshannaq
Created February 24, 2024 00:38
Show Gist options
  • Save mshannaq/0d191816c9362a09f39625cfa69a7c2d to your computer and use it in GitHub Desktop.
Save mshannaq/0d191816c9362a09f39625cfa69a7c2d to your computer and use it in GitHub Desktop.
wordpress api new post example
مثال علي استخدام
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