Title: Press This &#8211; Adding Custom Field
Last modified: August 19, 2016

---

# Press This – Adding Custom Field

 *  [litetheme](https://wordpress.org/support/users/litetheme/)
 * (@litetheme)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/press-this-adding-custom-field/)
 * What I’m trying to do is hit “Press This” on any website and get the url to store
   into a new custom field. This custom field will serve as an external link to 
   place anywhere in my theme.
 * On the theme, (typically single.php)
 *     ```
       <?php
       $elink = get_post_meta($post->ID, 'elink', true);
       ?>
       <?php echo $elink ?>
       ```
   
 * Now, if I were to use a normal Post editor, I would have to key in ‘elink’ in
   the Name field and the Url in the Value field.
 * This works like charm. I’m able to see my link on the Single.php (theme)
 * The bad news is, I still haven’t got it to play nicely with “Press This”
 * What I did was
 * 1. Add the following line in wp-admin/press-this.php, line :559
 *     ```
       Link: <input name="elink" type="text"  id="elink" class="mceEditor" style="width:100%;" value="<?php echo $url; ?>"/>
       ```
   
 * (this basically inserts URL into an input field.)
 * 2. Add this to press-this.php, line: 48
 *     ```
       $elink = $_REQUEST['elink'];
       ```
   
 * (this is supposed to declare $elink as a varible)
 * The problem I am having is, the URL is not sticking to the post. In other words,
   it’s not inserted into the database.
 * I’m not a programmer, so please let me know where I screwed up. Thank you in 
   advance.

Viewing 1 replies (of 1 total)

 *  [piblondin](https://wordpress.org/support/users/piblondin/)
 * (@piblondin)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/press-this-adding-custom-field/#post-1283142)
 * Did you ever figure this out? I’m trying to solve the same problem right now.
   Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Press This – Adding Custom Field’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [piblondin](https://wordpress.org/support/users/piblondin/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/press-this-adding-custom-field/#post-1283142)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
