Title: Difference between php include and wp get_header etc. ?
Last modified: August 18, 2016

---

# Difference between php include and wp get_header etc. ?

 *  [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/)
 * Can anyone tell me if there’s a huge amount of difference between using ‘<?php
   get_header(); ?>’ and a theoretical
    ‘<?php include(“header.inc”)?>’ ?
 * Is it a speed thing?

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488323)
 * those are completely different animals.
 * `<?php get_header(); ?>` is calling **the function** named get_header that is
   defined elsewhere.
 * while, `<?php include("header.inc")?>` is attempting to include **a file** named
   header.inc
 * so yes, on the face, theres a huge amount of difference.
 * If however, you are are attempting to substitute a file named header.inc for 
   the standard wordpress function, that would work.
 * And no there wouldnt be any measurable difference. it would be measured in miliseconds.
 *  Thread Starter [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488328)
 * Right, thankyou.
 * I should have used get_footer as it would have been easier to explain what I 
   want to do.
 * I’ve have hard-coded the same footer across various categories, archives etc.
   but was thinking of including a standard email address and some tracking code
   into the bottom of each of these. (Email address and tracking code could change
   at any time)
 * I know we’re only talking about milliseconds, but the milliseconds surely add
   up, especially if there’s a reasonable amount of traffic?
 * The function get_footer effectively seems to do the same thing as an include.
 * function get_footer() {
    if ( file_exists( TEMPLATEPATH . ‘/footer.php’) ) load_template(
   TEMPLATEPATH . ‘/footer.php’); else load_template( ABSPATH . ‘wp-content/themes/
   default/footer.php’);
 *  Thread Starter [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488329)
 * Or should I use
    <?php include (TEMPLATEPATH . ‘/footer.inc’); ?>
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488331)
 * get_footer = is a WP specific thing; it is defined in the core files and it works
   accordingly.
 * include (richarduk.php) = is a general PHP thing for including any file
 * the TEMPLATEPATH version works only if the non-standard, non-WP template file
   is located in the theme folder
 *  Thread Starter [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488344)
 * Thanks 🙂

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

The topic ‘Difference between php include and wp get_header etc. ?’ is closed to
new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [rendering](https://wordpress.org/support/topic-tag/rendering/)
 * [speed](https://wordpress.org/support/topic-tag/speed/)

 * 5 replies
 * 3 participants
 * Last reply from: [richarduk](https://wordpress.org/support/users/richarduk/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/difference-between-php-include-and-wp-get_header-etc/#post-488344)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
