Support » Fixing WordPress » Redirect not working going to $pid

  • I’m using a form to create posts, some of the code is below with the redirect. This is not redirecting to the newly created post it’s only refreshing the page with the form on it. Whats wrong with the redirect?

    $pid = wp_insert_post($new_post);
    wp_redirect( get_permalink($pid) );
  • The topic ‘Redirect not working going to $pid’ is closed to new replies.