B
B
bbeight2017-03-12 22:30:59
JavaScript
bbeight, 2017-03-12 22:30:59

How to create new post/comment wordpress api?

Hello everyone, I’m making a React topic for myself as a study, and again I’m dumb, I don’t understand how to add a new post or comment, namely nonces in wordpress and how to set it all up so that you can post without using localize_script? I didn’t bother with jquery, I chose a js file, passed a token to it and then I use it in the request, but how can I do without localize_script? Help someone know how to do it right :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasya Petrov, 2017-03-12
@VasyaPertrov

wp_insert_post
wp_update_post
Added.
https://developer.wordpress.org/rest-api/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question