WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Modifying 'the_contents' before saving? (6 posts)

  1. acebone
    Member
    Posted 3 years ago #

    Hi!

    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

    Like this:
    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)?

  2. ucfknight10
    Member
    Posted 3 years ago #

  3. acebone
    Member
    Posted 3 years ago #

    Thanks!!

  4. ucfknight10
    Member
    Posted 3 years ago #

    welcome

  5. ucfknight10
    Member
    Posted 3 years ago #

    *mark as resolved*

  6. acebone
    Member
    Posted 3 years ago #

    Done!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.