I want to launch my web browser from an automation tool I use and open WordPress “Add Nwe Post” page in the admin area with specific title and content (it varies everytime, I generate it dynamically on my local machine).
I know that I can use http://blog.mysite.com/wp-admin/post-new.php?post_title=sometitle
This is fine. However, if I try to set the content of the post, using “content” url parameter, it can be only plain text. If I set HTML, it is escaped automatically. Is there a way to set the HTML content of the post?
Also, I don’t know how I can set page categories via url parameters too?
P.S.: I don’t want to create programatically a new post, but just to have the Add Post page open with prefilled fields.
The problem is that
$content
is a reserved variable in WordPress, you have to use another name. Here, I have used$pre_content
: