Home Forums Front-end Issues Front End Form -> the_modified_time() Reply To: Front End Form -> the_modified_time()

  • Hey thanks for replying man.

    The function essentially does do nothing other than update the post object.

    So instead of creating a function that updates the modified time row in the database, I’m using wp_post_update() to simply update the post object so wordpress stamps the new time.

    So if I call this function on page load

    function update_time() {
      $my_post = array();
      $my_post['ID'] = 1674; //or $post->ID in the loop
      wp_update_post( $my_post );

    the function runs and updates the post specified (in this case post id 1674) and wordpress updates the last modified time of the post. they show an example of attaching this to save_post, which is basically what I’m trying to do.

    I’ll just manually make the form since I’m only updating 2 meta values (and both of them are pre-populated select boxes lol).

    I’ll mark it as solved but it would be interesting to know if its possible to do this.

    thanks again