Fixing WP head and foot

Fixing usage of wp_head and wp_foot which resolves issues with plugins