Title: how to set permalink on programmatically-generated post?
Last modified: August 19, 2016

---

# how to set permalink on programmatically-generated post?

 *  [janyap](https://wordpress.org/support/users/janyap/)
 * (@janyap)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/how-to-set-permalink-on-programmatically-generated-post/)
 * How to set permalink on a post created programmatically using `wp_insert_post`?
 * The auto-generated permalink is [http://home_url/year/month/](http://home_url/year/month/).
   
   All auto-generated posts created on the same date end up with the same permalink
   value – not helpful.
 * X-posted to [Stackoverflow.com](http://stackoverflow.com):
    [Set permalink on WordPress autopost](http://stackoverflow.com/questions/4959777/set-permalink-to-wordpress-autopost)

The topic ‘how to set permalink on programmatically-generated post?’ is closed to
new replies.

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [wp_insert_post](https://wordpress.org/support/topic-tag/wp_insert_post/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [janyap](https://wordpress.org/support/users/janyap/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/how-to-set-permalink-on-programmatically-generated-post/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
