Creating New Post with Content already in it?
-
Hiya, I’m wondering how to go about this problem – when creating a new post, I’d like to automatically fill the post content with a ‘template’ of sorts, basically words already in it upon creation.
I’ve tried to look up hooks for entirely new posts but it seems finicky, I feel like wp_insert_post might be the closest thing because I never immediately publish a post, I always do Save Draft at least once which is imperative to what I’m doing. However even looking at documentation I can’t really wrap my head around how to use it – I don’t want to use it to create an entirely new post, I just want to intervene WHEN the post is created to automagically add content.
What I’m not looking for is an alternative solution; I really need this in the post_content field and not some kind of hook after the_content, and I would like to automate this every time I create a new post instead of copy+pasting stuff.
- The topic ‘Creating New Post with Content already in it?’ is closed to new replies.