Title: Custom Fields
Last modified: August 19, 2016

---

# Custom Fields

 *  [hbmarketing](https://wordpress.org/support/users/hbmarketing/)
 * (@hbmarketing)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/)
 * Hi
 * I have added a custom template (page of posts) page to my site and need the custom
   field ‘category’ to equal the value of ‘scurity’ (the category of posts i want
   the page to display.
 * How do i write the code for this value?

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

 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/#post-1686469)
 * Try using get_posts, there are some examples here:
 * [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 *  Thread Starter [hbmarketing](https://wordpress.org/support/users/hbmarketing/)
 * (@hbmarketing)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/#post-1686514)
 * Hi
 * Thank you, but im not sure if i am doing it correctly.
 * do you know what the exact code might be?
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/#post-1686548)
 * The first example shows how to get posts for a single category, just add in your
   own.
 *  Thread Starter [hbmarketing](https://wordpress.org/support/users/hbmarketing/)
 * (@hbmarketing)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/#post-1686894)
 * do i put this in the custom field box below where you type in the text?

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

The topic ‘Custom Fields’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [hbmarketing](https://wordpress.org/support/users/hbmarketing/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-29/#post-1686894)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
