Header, Footer in WordPress -4

Header, Footer in WordPress -4

get_header() and get_footer() includes the header and footer template for a customize theme.

Header.php

<!DOCTYPE html>

<html>

    <head>

      <meta charset=”UTF-8″>

      <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

        <?php wp_head();?>

    </head>

    <body>

[HTML and PHP Code of Header]

Wp_head () prints scripts or data in the head tag of HTML

Footer.php

[HTML and PHP Code of  Footer ]

<?php wp_footer();?>

</body>

Wp_footer () prints scripts or data before the closing body tag of HTML

Pages.php

For new pages create new php file i.e. page-event[custom-name] in Visual studio

<? php

// Template Name: [page-name]

get_header ();

[HTML and PHP Code ]

get_footer ();

?>

Now create a new page in wp-admin then choose template for specific page

Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

*

*