Title: Define variable in theme code and access it form a post content
Last modified: August 19, 2016

---

# Define variable in theme code and access it form a post content

 *  [superwillyfoc](https://wordpress.org/support/users/superwillyfoc/)
 * (@superwillyfoc)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/define-variable-in-theme-code-and-access-it-form-a-post-content/)
 * Hi,
    I need to define a new variable in my “header.php” file, use it modifying
   its value and then access it from a post content using PHP code.
 * Now I have tried it and I can’t see the variables from the content of a post.
 * Could you give some help?
 * Thank you very much,
    Guille

The topic ‘Define variable in theme code and access it form a post content’ is closed
to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [content](https://wordpress.org/support/topic-tag/content/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [superwillyfoc](https://wordpress.org/support/users/superwillyfoc/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/define-variable-in-theme-code-and-access-it-form-a-post-content/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
