Title: [Plugin: SidePosts Widget]
Last modified: August 19, 2016

---

# [Plugin: SidePosts Widget]

 *  [slobizman](https://wordpress.org/support/users/slobizman/)
 * (@slobizman)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/plugin-sideposts-widget-1/)
 * I love your sideposts widget!
 * I hoping you could help me with the code I’d need to add to display a custom 
   field. Specifically, I will have a custom field for a URL. In the custom Sideposts
   template I’d create, I want add the following line at the bottom of the sidepost
   that says:
 * Go to webpage
 * That would be hperlinked to the URL in the custom field.
 * Can anyone provide the code I’d need for this?

Viewing 1 replies (of 1 total)

 *  [Txanny](https://wordpress.org/support/users/txanny/)
 * (@txanny)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/plugin-sideposts-widget-1/#post-1385069)
 * Well, imagine you name your custom field: ‘go_url’
 * To get it from a post, just use the get_post_meta() function:
 *     ```
       $go_url = get_post_meta(get_the_ID(), 'go_url', true);
       ```
   
 * And display the custom field content anywhere you want. Example: two fields: 
   the site_name and site_url, you could set something like this:
 *     ```
       $post_id = get_the_ID();
       echo '<p>View also: <a href="'
           . get_post_meta($post_id, 'site_url', true) .
           '">' . get_post_meta($post_id, 'site_name', true)
           . '</a></p>';
       ```
   
 * Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: SidePosts Widget]’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Txanny](https://wordpress.org/support/users/txanny/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/plugin-sideposts-widget-1/#post-1385069)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
