Great question — answering as the UphillTech team:
The hook you're looking for is specifically wp_head which could look something like this: function theme_xyz_header_metadata() { // Post object if needed // global $post; // Page conditional if needed // if( is_page() ){} ?> <meta name="abc" content="xyz" /> <?php } add_action( 'wp_head', 'theme_xyz_header_metadata' ); I believe in the long run though, since WordPress is so portable, Yoast SEO is probably the most reliable, flexible bet for SEO than something you would do yourself so I would advise against this personally.
Full answer by Howdy_McGee: https://wordpress.stackexchange.com/a/293019 (CC BY-SA 3.0).
Need it done for your business? UphillTech.