Title: PHP var in wordpress
Last modified: August 18, 2016

---

# PHP var in wordpress

 *  [freeriders88](https://wordpress.org/support/users/freeriders88/)
 * (@freeriders88)
 * [19 years ago](https://wordpress.org/support/topic/php-var-in-wordpress/)
 * I’m very new to WP
 * I try to define some variables on the header for my nav bar (which is both in
   header and footer)
 * like for example:
 *     ```
       // I declare le navigation values to be used on the 2 nav bars
       $navAboutMe= get_page_link('19');
       ```
   
 * but when I want to access $navAboutMe inside the footer.php my var is empty.
 * why does those vars are reseted? and where? and do you have an idea on how I 
   can get through it
 * thanx you in advance
 * Steffy

The topic ‘PHP var in wordpress’ is closed to new replies.

## Tags

 * [footer](https://wordpress.org/support/topic-tag/footer/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [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: [freeriders88](https://wordpress.org/support/users/freeriders88/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/php-var-in-wordpress/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
