I am coding a custom post type.
Using the hook ‘save_post’ I am able to manipulate custom meta data before it’s saved to the database
add_action('save_post', 'dosomething'), 10, 2);
I would also like to be able to manipulate the excerpt and the contents, but I don’t know how to set them?
In other words: we have a ‘get_the_contents function’, but there is no ‘set_the_contents’ function.
So how do I set the value of the content (and the excerpt)?
- The topic ‘Modifying 'the_contents' before saving?’ is closed to new replies.