9951 explained code solutions for 126 technologies


php-wordpressHow to use get_header in WordPress using PHP?


Using get_header() in WordPress with PHP is a simple process. This function is used to include the header template for the active theme.

<?php get_header(); ?>

This code will include the header template for the active theme.

Code explanation

  1. <?php - This is the opening PHP tag.
  2. get_header() - This is the function used to include the header template for the active theme.
  3. ?> - This is the closing PHP tag.

Helpful links

Edit this code on GitHub