WordPress.org

Forums

Need custom page with custom header (3 posts)

  1. montytx
    Member
    Posted 6 years ago #

    I am setting up a custom image gallery page and need to load script and css on this page only into the header file. Modifying the header is easy enough and renaming it. But I need to define the new header file name somewhere so this include will work: <?php get_vtheader(); ?>

    I can't seem to find the file for definitions so I can add vt header.

    Thanks

  2. buddha trance
    Member
    Posted 6 years ago #

    I don't know if it will work, but you can try editing general-template.php in the wp-includes folder.

    Here is the call for the header

    function get_header( $name = null ) {
    	do_action( 'get_header' );
    
    	$templates = array();
    	if ( isset($name) )
    		$templates[] = "header-{$name}.php";
    
    	$templates[] = "header.php";
    
    	if ('' == locate_template($templates, true))
    		load_template( get_theme_root() . '/default/header.php');
    }

    Try to change the call to the file header.php to vtheader.php (as a file path, not the function get_header, otherwise you will have to change all the theme templates as well).

  3. Doodlebee
    Member
    Posted 6 years ago #

    Couldn't you just replace the call:

    <?php get_header(); ?>

    with

    <?php include(TEMPLATEPATH . '/vtheader.php'; ?>

    ?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.