PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, November 9, 2022

[FIXED] How to add header and footer to html static page?

 November 09, 2022     html, php, wordpress     No comments   

Issue

I have wordpress website that I have converted to html.

I only need one page from it.

I added this page to the directory of the second wordpress website. test.com/html-page

My problem is: I want to add header and footer of the second website in it.

I have deleted the header and the footer of the html page and change it to php then added header and footer like this

code:

   <?php get_header(); ?>
      <!DOCTYPE html>
      <!-- here is the page content-->
    </html>
        <?php get_footer(); ?>

But it doesn't show anything at all


Solution

Simply use

<?php include 'includes/header.php'; ?>

replace the "includes/header.php" with the php file you actually want



Answered By - liquidot
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing