Support » Fixing WordPress » Need custom page with custom header

  • montytx

    (@montytx)


    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • buddha trance

    (@buddha-trance)

    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).

    Doodlebee

    (@doodlebee)

    Couldn’t you just replace the call:

    <?php get_header(); ?>

    with

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

    ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need custom page with custom header’ is closed to new replies.