• <?php get_template_part(‘header’); ?>
    vs
    <?php get_header(); ?>

    any difference? does get_header make extra calls? seems to works for me, and I like standardizing things ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter knowltonsteve

    (@knowltonsteve)

    doesnt seem to be anything fancy… minus the defult fallback, which i dont care about

    function get_header() {
    if ( file_exists( TEMPLATEPATH . ‘/header.php’) )
    load_template( TEMPLATEPATH . ‘/header.php’);
    else
    load_template( ABSPATH . ‘wp-content/themes/default/header.php’);
    }

    Not really at lot of difference, get_template_part does an include and load_template does a require.

    But get_header(); would be the standard way to do it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_template_part(‘header’) vs get_header’ is closed to new replies.