Starter Guide On Header.php

Ravael Angeline has a tutorial posted on WP.Tutsplus.com that covers the basics of a header.php file. This particular file is located in every WordPress theme and is essential to how a theme works. Also worthy of reading following the tutorial is a comment by Tom McFarlin.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

1 Comment


  1. This is more like “Ancient History” Starter Guide on header.php ;)
    http://wp.tutsplus.com/tutorials/theme-development/the-header-php-what-needs-to-go-in-it-and-what-doesnt/#comment-19170

    wp_register_script and wp_register_styles are not recommended nor best practice guide, it should be wp_enqueue_script only e.g.

    function my_custom_script() {
    wp_enqueue_script( ‘custom-scripts’, get_template_directory_uri() . ‘/js/custom-scripts.js’, ‘jquery’, ’1.0′, false );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_custom_script’ );

    and this doesn’t need to be registered at all.

    Another example: https://github.com/thethemefoundry/twentytwelve/blob/master/build/functions.php

    Cheers,
    Emil

    Report

Comments are closed.