w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
I can not insert my header page to my wordpress index.php page.?

In the WordPress syntax, the normal way to "load" the Header in mostly any pages that are in the "theme" folder.

You should be using something like this.

    <?php
/**
 * Template Name: Front Page Template
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header(); ?>

the function get_header() normally loads the header.php file where you will be placing all your content.

--

If you want to load your WordPress header on an external file or folder you will need to load the function wp_load() where you can find into the root of the WordPress folder.

<?php require_once($_SERVER['DOCUMENT_ROOT'] .
'/your_extra_path/wp-load.php' ); ?>

Hope I understood your question.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.