Create post
See original GitHub issueI can’t seem to add a post. I’m getting this error when I follow the example in the readme:
TypeError: wp.posts(…).create is not a function
Code:
wp.posts().create({
// "title" and "content" are the only required properties
title: 'Your Post Title',
content: 'Your post content',
// Post will be created as a draft by default if a specific "status"
// is not specified
status: 'publish'
}).then(function( response ) {
// "response" will hold all properties of your newly-created post,
// including the unique `id` the post was assigned on creation
console.log( response.id );
})
I also tried to change it to wp.posts().post which gives me this error:
Unhandled rejection Error: Unauthorized
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
Free Graphic Maker: Make Your Own Social Media Posts
The Adobe Express free online social media graphic maker helps you easily create your own custom social media designs in minutes. All creative...
Read more >Design Awesome Social Media Graphics With Canva
1. Open up Canva and search for "Social Media Graphics" to start designing. 2. Explore social media graphics for every industry and theme,...
Read more >Free Online Facebook Post Maker - Create - VistaCreate
Want your Facebook posts to get noticed, liked, and shared? Create your own stunning DIY designs using the VistaCreate's free post maker.
Read more >Free Facebook Post Maker - Create Beautiful Posts - Visme
Creating beautiful posts is easy with our free Facebook post maker. Take your Facebook page to the next level with our editable Facebook...
Read more >How to Create a Facebook Post - YouTube
Posting on Facebook is key to engaging and growing your followers. You can use posts to share your business updates (hours of operation), ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mrkrumhausen Can I ask you to ask that other question in a new issue? 😃 I’m going to close this one.
As to the documentation note, we currently mention the basic auth plugin both in the authentication section of this plugin and the authentication guide on the docs site, but I’m open to adding more references if you have suggestions for other callouts.
Good suggestion, thank you! We’re close to v0.9 (with media support) and could sneak a docs reorg in there.