Title: html code in custom fields
Last modified: August 19, 2016

---

# html code in custom fields

 *  Resolved [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/)
 * I have 1 custom field per post on [http://www.b1k1n1.com](http://www.b1k1n1.com)(
   NSFW)
    the field is called provided and the value is something like
 *     ```
       <a href='http://www.b1k1n1.com' target='_blank'>Bikini Babes</a>
       ```
   
 * If I save this it gets saved as
 *     ```
       <a href=\'http://www.b1k1n1.com\' target=\'_blank\'>Bikini Babes</a>
       ```
   
 * and leaves the url broken
 * If I remove the slashes it works again. Any ideas on how to do this properly ?(
   as in not having to change it manually)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [SteveSmith1983](https://wordpress.org/support/users/stevesmith1983/)
 * (@stevesmith1983)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837912)
 * It’s been [reported as a bug](http://trac.wordpress.org/ticket/7346) – it’s annyoing
   isn’t it! I suppose it will be fixed in the next release.
 *  [educationthemes](https://wordpress.org/support/users/educationthemes/)
 * (@educationthemes)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837913)
 * why not try putting the `<a href="` and the `</a>` in your template file and 
   then the custom field will just be:
 * `<a href='http://www.b1k1n1.com'>Bikini Babes</a>`
 * Thats what I do and haven’t had the problems?
 *  [SteveSmith1983](https://wordpress.org/support/users/stevesmith1983/)
 * (@stevesmith1983)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837917)
 * Ahh, hadn’t thought of that!
 *  [educationthemes](https://wordpress.org/support/users/educationthemes/)
 * (@educationthemes)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837919)
 * sorry the custom field would just be
 * [http://www.b1k1n1.com](http://www.b1k1n1.com) without the a tags if they are
   on the tempalte file.
 * Like I said working for me with 2.6.
 *  Thread Starter [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837923)
 * I like the idea, have to figure it out, but then I have to make 2 custom fields,
   one for the url and one for the name, right ???
 * Just thought of something. If I do change to this, I have to edit all 300 posts
   manually again 🙂 so i’ll think twice…
 *  Thread Starter [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837924)
 * just tried it out… works very nice, better than my solution, have to admit that,
   but editing 300 posts is not something I want to do 🙂
 *  [educationthemes](https://wordpress.org/support/users/educationthemes/)
 * (@educationthemes)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837926)
 * Glad it works, but I can see your point about updating 300 posts 🙁
 * I tend to make site for other people and therefore I need them to be as simple
   as possible for the user. Therefore putting all the html tags in the template
   makes sense so they don’t have to worry about them.
 * In fact i would even put in the http:// as moust don’t always enter that when
   typing a web address in.
 * I suppose a personal site it is easier any way really as long as you know yourself.
 *  Thread Starter [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837957)
 * did change it and works easy now

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘html code in custom fields’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [Beee](https://wordpress.org/support/users/beee/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/html-code-in-custom-fields/#post-837957)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
