Reputation: 1
I'm building a wordpress website with an HTML page as homepage
i'd like to add to the HTML homepage the header and footer from wordpress in order to make it consistent with the rest of the website
I'm really not an expert, so I'd like a simple way, if there's one
Thanks for your help
Upvotes: 0
Views: 1360
Reputation: 82734
If I understand you correctly, every page but the front page is handled by WordPress, while the front page is a single static HTML file (say, index.html
). In that case, if you want the Wordpress header and footer, you would be better off letting Wordpress handle the front page, too.
To heavily customize the front page, you can let the Wordpress template hierarchy work in your favor. In your theme folder, add a file front-page.php
with the following content:
<?php get_header(); ?>
<!-- here is your own content, that was previously in index.html -->
<?php get_footer(); ?>
Upvotes: 1
Reputation: 334
Just apply <?php get_header(); ?>
and <?php get_footer(); ?>
to the wanted position in the template file.
Upvotes: 1