-
I want to start Google Scholar Indexing inside WordPress. So Google Scholar suggest adding these meta tags in the head section, but these tags contain information about WordPress Post. For Example, Post Title, keyword, Author name, Post Publish date those types of info. But the problem is when the post will be changed, author name, keywords all those meta info will also be changed. You can check the meta tags here, moreover I also add the link of Google Scholar,
<meta name=”citation_title” content=”DESCI O EL FUTURO DE LA CIENCIA”>
<meta name=”citation_author” content=”Pantaleo, Patricio Iván”>
<meta name=”citation_author_orcid” content=”0000-0002-8104-8975″>
<meta name=”citation_publication_date” content=”2022/05/26″>
<meta name=”citation_journal_title” content=”Paideia Studio”>
<meta name=”citation_doi” content=”10.5281/zenodo.6587499″>
<meta name=”citation_fulltext_html_url” content=”https://paideiastudio.net/desci-o-el-futuro-de-la-ciencia/”>
<meta name=”citation_keywords” content=”DeSci; Ciencia descentralizada; Decentralized science; Open Science;”>Google Scholar Documentation : https://scholar.google.com/intl/en/scholar/inclusion.html#indexing
How can I achieve this inside WordPress? Please help me to solve this so that it would be a great help. Thanks
-
Hello,
We apologize for the issue you are facing with indexing meta tags for Google Scholar in WordPress. To add the required meta tags dynamically based on your post information, you can use the Rank Math plugin by following these steps:
-
Install and Activate Rank Math: If you haven’t already, install and activate the Rank Math plugin on your WordPress site. You can find step-by-step instructions in the Rank Math setup guide.
-
Add Custom Meta Tags: You can add custom meta tags by using a filter in your theme’s
functions.phpfile or by creating a custom plugin. Here’s an example of how to add the Google Scholar meta tags dynamically:add_action('wp_head', function() { if (is_single()) { global $post; $author = get_the_author(); $publish_date = get_the_date('Y/m/d'); $keywords = get_post_meta($post->ID, 'keywords', true); // Assuming you have a custom field for keywords echo ' '; echo ' '; echo ' '; echo ' '; // Add other meta tags similarly } }); -
Save Changes: After adding the above code to your
functions.phpfile, save the changes. This will ensure that the meta tags are dynamically generated based on the post’s information whenever a post is viewed.
Please note that you may need to adjust the code to fit your specific needs, such as how you retrieve keywords or other metadata.
If you have any further questions or need assistance, feel free to ask!
But I need to insert those meta tags dynamically.
Hello,
Unfortunately, this is something that is already outside the scope of our support since we currently don’t generate these types of meta tags.
To make them generate with dynamic values, you’ll need to edit the code we shared previously. If you’re using a custom field for the rest of the citation info, you can integrate that programmatically into the code we initially shared like so:
echo '<meta name="citation_journal_title" content="'.get_field('journal_title').'" />';Don’t hesitate to get in touch with us if you have any other questions.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
-
The ticket ‘Hi I want to index meta tag of Google Scholar in the header’ is closed to new replies.