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); update_post_meta($pid,'domain',$domain); update_post_meta($pid,'keywords',$keywords); wp_redirect( get_permalink($pid) ); exit();
- The topic ‘Redirect not working going to $pid’ is closed to new replies.