You will first need to add some metaboxes to your posts. This has been answered a lot, and there are many posts on the internet about is, such as this full guide.
After adding metaboxes, you can hook into the wp_head
action hook and output your metadata. Here’s a simple piece of code that goes into your theme’s functions.php
file:
add_action ( 'wp_head', 'add_my_metadata' );
function add_my_metadata() {
if ( is_single() ) {
?><meta name="citation_title" content="<?php echo get_post_meta( get_the_ID(), 'meta_key_here', true ); ?>" /><?php
}
}
Make sure that your theme has the wp_head()
function inside its header.php
file, so the action hook can actually print the above code.