in

Add header and footer code in WordPress without a plugin

Add header code

add_action('wp_head', 'custom_header_code');
function custom_header_code(){
?>
	header code goes here
<?php
};

Add footer code

add_action('wp_footer', 'custom_footer_code');
function custom_footer_code(){
?>
	footer code goes here
<?php
};