Title: How to post php code in header.php !
Last modified: August 31, 2016

---

# How to post php code in header.php !

 *  Resolved [Iramr](https://wordpress.org/support/users/iramr/)
 * (@iramr)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-post-php-code-in-headerphp/)
 * Hellow ,
    I m a newbie to wordpress and dunt know much about php .
 * The thing is i want to add a code to header.php but my themes header show
 *     ```
       <?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
   
       /**
        * The template for displaying pages headers
        *
        * Please do not overload this file directly. Instead have a look at framework/templates/header.php: you should find all
        * the needed hooks there.
        */
   
       us_load_template( 'templates/header' );
       ```
   
 * Now the thing is , I got to framework/templates/header.php , Idunt know where
   to paste the code .

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

 *  [Biplav](https://wordpress.org/support/users/bplv/)
 * (@bplv)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-post-php-code-in-headerphp/#post-7189907)
 * The question is too vague. When do you want the code to execute. What is the 
   code? Is it a complex code or is it just a general echo ? Specify the question
   first
 *  Thread Starter [Iramr](https://wordpress.org/support/users/iramr/)
 * (@iramr)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-post-php-code-in-headerphp/#post-7189930)
 * I want to add a facebook pixel .
    I have to put the code anywhere in the header.
   php

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

The topic ‘How to post php code in header.php !’ is closed to new replies.

## Tags

 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [stack overflow](https://wordpress.org/support/topic-tag/stack-overflow/)

 * 2 replies
 * 2 participants
 * Last reply from: [Iramr](https://wordpress.org/support/users/iramr/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-post-php-code-in-headerphp/#post-7189930)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
