Title: Create posts with custom guid without &quot;http://&quot; ?
Last modified: August 21, 2016

---

# Create posts with custom guid without "http://" ?

 *  [machouinard](https://wordpress.org/support/users/machouinard/)
 * (@machouinard)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/create-posts-with-custom-guid-without-http/)
 * I’m creating posts and need to set the guid based on the primary key of the database
   table where the post info is coming from. I thought I could just add `'guid' 
   => 'myString'` to the post array, but that isn’t working as I had hoped. If I
   build the guid string by appending something to `site_url()`, all is fine. If
   I try to set a non-url string as the guid, WP appends the http:// to it. I would
   prefer it’s correct in the database as opposed to using a filter after the fact(
   get_the_guid ).
 * Any ideas?

Viewing 1 replies (of 1 total)

 *  [sozot](https://wordpress.org/support/users/sozot/)
 * (@sozot)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/create-posts-with-custom-guid-without-http/#post-3920703)
 * You and me both. Right now this isn’t possible without a core code edit unfortunately.

Viewing 1 replies (of 1 total)

The topic ‘Create posts with custom guid without "http://" ?’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [sozot](https://wordpress.org/support/users/sozot/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/create-posts-with-custom-guid-without-http/#post-3920703)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
