Support » Plugins » Custom code on Post

  • Resolved artcoder

    (@artcoder)


    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.

Viewing 1 replies (of 1 total)
  • artcoder

    (@artcoder)

    I found it here.

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

Viewing 1 replies (of 1 total)
  • The topic ‘Custom code on Post’ is closed to new replies.