In the post edit screen you can add the data as custom fields and then pull those custom fields into your post templates, like this:
If you’d like a better admin interface for these fields, that’s possible and there are plenty of guides around the web and on this site. Search for admin metabox
.
To pull the data into your theme, add this untested code to functions.php
or if you can’t edit the theme make it into your own plugin.
function wpse_235005_post_meta(){
if ( !is_single() ) {
return;
/* bail out if not showing a single post of the right type
You may want to adjust this conditional to suit your site,
maybe checking for a custom post type
*/
}
global $post; // outside the loop make sure we can see this post
$fields = array(
"citation_publication_date",
"citation_journal_title",
"citation_volume",
"citation_issue",
"citation_firstpage",
"citation_lastpage",
"citation_pdf_url"
)
foreach( $fields as $field ) {
if( $value = get_post_meta($post->ID, $field, true) ) {
// in PHP empty strings are falsy
echo '<meta name="';
echo $field;
echo '" content="';
echo $value;
echo '">';
}
}
}
add_action('wp_head', 'wpse_235005_post_meta');
/* adjust the priority to move your meta elements up or down
within your document's head
*/