Mohanad
Mohanad

Reputation: 3

how to use default wordpress header and footer in static html page

I have a wordpress website located "public_html" folder and I uploaded a static HTML page name facts.html to a new folder in public_html/nutritionfacts, let say its very simple like:

<html>
<body>
<h1> FACTS </h1>
</body>
</html>

How can I add the default website header and footer to new static html page? and if I have 1000 static pages what is the best way to do it.

Upvotes: 0

Views: 730

Answers (1)

Always Helping
Always Helping

Reputation: 14570

You need all those pages in .php extension add the following native function get_header get_footer on all those static pages and your header and footer will appear.

facts.php

require '../../wp-load.php';

<?php get_header(); ?>

   echo "<html>
    <body>
    <h1> FACTS </h1>
    </body>
    </html>";

<?php get_footer(); ?>

Upvotes: 2

Related Questions