Title: Custom Field Hack
Last modified: August 19, 2016

---

# Custom Field Hack

 *  [nallu](https://wordpress.org/support/users/nallu/)
 * (@nallu)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-field-hack/)
 * Hello all,
 * I am currently facing an issue with ‘Custom fields’ metabox. In addition to the
   Name, Value in the custom fields metabox, I want to add a third column called‘
   Link’ and then store its value in the database as well.
 * I don’t want to change the codebase and looking for a good solution for the above
   stated issue.
 * Can anybody provide me a direction for the same?
 * Thanks in advance

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

 *  [ambrosite](https://wordpress.org/support/users/ambrosite/)
 * (@ambrosite)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-field-hack/#post-1872163)
 * I think you are misunderstanding how custom fields are supposed to work. Name
   and Value map directly to the meta_key and meta_value columns in the wp_postmeta
   table, so it would be impossible to add a third column as you describe without
   altering the table definition. If you want to add a link to a post as a custom
   field, the Name should be ‘link’ (or something similar), and the Value would 
   be the link itself. You can add as many custom fields as you want.
 *  Thread Starter [nallu](https://wordpress.org/support/users/nallu/)
 * (@nallu)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-field-hack/#post-1872226)
 * thanks for the reply

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

The topic ‘Custom Field Hack’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [nallu](https://wordpress.org/support/users/nallu/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/custom-field-hack/#post-1872226)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
