WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom code on Post (2 posts)

  1. artcoder
    Member
    Posted 5 years ago #

    I want to add some custom PHP code so that whenever the user publish a post, WordPress will write the post title to a text file on the webserver. I know how to write file in PHP. I just don't know where to insert this PHP code into the WordPress framework.

    If you point me to reference or tutorial, I can figure it from there.

  2. artcoder
    Member
    Posted 5 years ago #

    I found it here.

    It goes something like ...
    add_action('publish_post', 'yourfunction');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.