[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fxjFHfDRocjeqwmAwTd9Et9ugkAzqIcgfETQDvXDr9TE":3},{"slug":4,"display_name":4,"profile_url":5,"plugin_count":6,"total_installs":7,"avg_security_score":8,"avg_patch_time_days":9,"trust_score":10,"computed_at":11,"plugins":12},"frontity","https:\u002F\u002Fprofiles.wordpress.org\u002Ffrontity\u002F",1,200,85,30,84,"2026-04-04T18:00:19.304Z",[13],{"slug":14,"name":15,"version":16,"author":4,"author_profile":5,"description":17,"short_description":18,"active_installs":7,"downloaded":19,"rating":20,"num_ratings":21,"last_updated":22,"tested_up_to":23,"requires_at_least":24,"requires_php":25,"tags":26,"homepage":32,"download_link":33,"security_score":8,"vuln_count":34,"unpatched_count":34,"last_vuln_date":35,"fetched_at":36},"rest-api-head-tags","REST API – Head Tags","1.2.1","\u003Cp>This plugin adds all the tags in the head section of a website to WordPress REST API responses.\u003C\u002Fp>\n\u003Cp>It is perfect if you are using WordPress for a headless set-up and would like to add the \u003Cstrong>meta tags\u003C\u002Fstrong> generated by your \u003Cstrong>WordPress SEO plugin\u003C\u002Fstrong> (like Yoast SEO or All-in-One SEO Pack) to the WordPress REST API output.\u003C\u002Fp>\n\u003Ch4>Requirements\u003C\u002Fh4>\n\u003Cp>This package depends on the \u003Ca href=\"https:\u002F\u002Fwww.php.net\u002Fmanual\u002Fen\u002Fbook.dom.php\" rel=\"nofollow ugc\">PHP DOM library\u003C\u002Fa>. Most PHP environments have it by default so you don’t have to worry about that.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>In case you get some errors regarding this dependency make sure you have this library installed (you can take a look at this \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffrontity\u002Fwp-plugins\u002Fissues\u002F35\" rel=\"nofollow ugc\">thread\u003C\u002Fa> in the code repository).\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch4>Compatibility\u003C\u002Fh4>\n\u003Cp>This plugin is compatible and works out of the box with some of the most popular WordPress SEO plugins. These are the ones that we tested:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fwordpress-seo\u002F\" rel=\"ugc\">Yoast SEO\u003C\u002Fa> – (up to 13.5)\u003C\u002Fstrong>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fall-in-one-seo-pack\u002F\" rel=\"ugc\">All in One SEO Pack\u003C\u002Fa> – (up to 3.4.2)\u003C\u002Fstrong>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Falleyinteractive\u002Fwp-seo\" rel=\"nofollow ugc\">WP SEO\u003C\u002Fa> –\u003C\u002Fstrong>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Are you using a different SEO plugin and want to know if it’s compatible? Feel free to ask in our \u003Ca href=\"https:\u002F\u002Fcommunity.frontity.org\u002F?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">community forum\u003C\u002Fa>. If you tested any other plugin, please let us know as well so we can update the list.\u003C\u002Fp>\n\u003Ch3>How to use this plugin\u003C\u002Fh3>\n\u003Ch4>Entities with head tags\u003C\u002Fh4>\n\u003Cp>The plugin has been developed to include the head_tags field to the REST API response of most of the WordPress core entities:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Posts, pages, attachments and custom post types.\u003C\u002Fli>\n\u003Cli>Post types: for archive pages.\u003C\u002Fli>\n\u003Cli>Categories, tags and custom taxonomies.\u003C\u002Fli>\n\u003Cli>Authors.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>In a Frontity project\u003C\u002Fh4>\n\u003Cp>If you are using \u003Ca href=\"https:\u002F\u002Ffrontity.org?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">Frontity\u003C\u002Fa>, you just have to install the \u003Ca href=\"https:\u002F\u002Fdocs.frontity.org\u002Fapi-reference-1\u002Ffrontity-head-tags?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">@frontity\u002Fhead-tags package\u003C\u002Fa> and \u003Cstrong>it will work automatically\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Ch4> In a different project\u003C\u002Fh4>\n\u003Cp>You need to understand better how it works and \u003Cstrong>add the data manually\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>\u003Cem>How to fetch the head_tags field manually\u003C\u002Fem>\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>You have to get each entity from its respective REST API endpoint. For example: for fetching the posts, you should go to \u003Ccode>\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts&id=123\u003C\u002Fcode> endpoint; for fetching the categories, you have to go to \u003Ccode>wp-json\u002Fwp\u002Fv2\u002Fcategories&id=123\u003C\u002Fcode>, and for custom post types or custom taxonomies, it would be a different url in each case.\u003C\u002Fp>\n\u003Cp>In the case of the homepage, it’s less intuitive and you should go to \u003Ccode>\u002Fwp-json\u002Fwp\u002Fv2\u002Ftypes\u002Fpost\u003C\u002Fcode>. As previously said, each entity has a different endpoint so if you aren’t familiar with this, you should check out the \u003Ca href=\"https:\u002F\u002Fdeveloper.wordpress.org\u002Frest-api\u002Freference\u002F\" rel=\"nofollow ugc\">WordPress REST API reference\u003C\u002Fa> for more information.\u003C\u002Fp>\n\u003Cp>Inside each endpoint, it will be a new field named \u003Cem>head_tags\u003C\u002Fem>, which will be an array of objects representing the tags that WordPress would normally include inside the html head element. These objects have the properties \u003Ccode>tag\u003C\u002Fcode>, \u003Ccode>attributes\u003C\u002Fcode> and \u003Ccode>content\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>For example for these HTML tags:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u003Ctitle>Hello wordl! - My Site\u003C\u002Ftitle>\n\u003Cmeta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\">\n\u003Clink rel=\"canonical\" href=\"\u003Chttps:\u002F\u002Ftest.frontity.org\u002F>\" \u002F>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This would be the content of the head_tags field:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\"head_tags\": [\n  {\n    \"tag\": \"title\",\n    \"content\": \"Hello world! - My Site\"\n  },\n  {\n    \"tag\": \"meta\",\n    \"attributes\": {\n      \"name\": \"robots\",\n      \"content\": \"max-snippet:-1, max-image-preview:large, max-video-preview:-1\"\n    }\n  },\n  {\n    \"tag\": \"link\",\n    \"attributes\": {\n      \"rel\": \"canonical\",\n      \"href\": \"\u003Chttps:\u002F\u002Ftest.frontity.org\u002F>\"\n    }\n  }\n]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Settings\u003C\u002Fh3>\n\u003Cp>The settings of this plugin are really simple.\u003C\u002Fp>\n\u003Ch4>Purge cache\u003C\u002Fh4>\n\u003Cp>In order to not affect the performance of your site, the head_tags field is cached for all your responses. Each time you update a post\u002Fpage\u002Fcpt or a taxonomy, the cache for that entity will be purged automatically. In case you make global changes (i.e. your permalinks or your global Yoast settings) use the Purge button to clean the whole cache.\u003C\u002Fp>\n\u003Ch4> Enable output\u003C\u002Fh4>\n\u003Cp>By default, the head_tags field is included in the common endpoint of each entity. You can configure it so it doesn’t appear by default and to be shown when you include the head_tags=true query.\u003C\u002Fp>\n\u003Cp>For example, with the output disabled, https:\u002F\u002Ftest.frontity.org\u002Fwp-json\u002Fwp\u002Fv2\u002Fposts won’t show the head_tags field unless you have the query \u003Ccode>?head_tags=true\u003C\u002Fcode> at the end.\u003C\u002Fp>\n\u003Ch4>Skip cache\u003C\u002Fh4>\n\u003Cp>In case you want to skip the cache, you can do so by adding to the query the  parameter \u003Ccode>skip_cache\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>There are some cache plugins for the REST API which also use the same parameter. In case you want to ignore the cache for the REST API call but not for the head tags, you can use \u003Ccode>skip_cache&head_tags_skip_cache=false\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch3>Problems and Questions\u003C\u002Fh3>\n\u003Cp>If you have any trouble with the REST API – Head Tags, you can check out \u003Ca href=\"https:\u002F\u002Fdocs.frontity.org\u002Ffrontity-plugins\u002Frest-api-head-tags?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">our docs\u003C\u002Fa> or join our \u003Ca href=\"https:\u002F\u002Fcommunity.frontity.org\u002F?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">community forum\u003C\u002Fa> and let us know. We’ll be happy to help!\u003C\u002Fp>\n\u003Cp>Bug reports for REST API – Head Tags plugin are welcomed in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffrontity\u002Fwp-plugins\" rel=\"nofollow ugc\">our repository\u003C\u002Fa> on GitHub. Before opening an issue, please be sure to review the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffrontity\u002Ffrontity\u002Fblob\u002Fdev\u002FCONTRIBUTING.md\" rel=\"nofollow ugc\">contributing guidelines\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3>More Information\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdocs.frontity.org\u002F#what-is-frontity?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">About Frontity Framework\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fblog.frontity.org\u002Fseo-for-headless-wordpress-themes\u002F?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">Guide on SEO for Headless WordPress Themes\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>Follow Frontity on \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Ffrontity\" rel=\"nofollow ugc\">Twitter\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffrontity\u002Ffrontity\" rel=\"nofollow ugc\">GitHub\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>Get help on the \u003Ca href=\"https:\u002F\u002Fcommunity.frontity.org\u002F?utm_source=plugin-repository&utm_medium=readme&utm_campaign=rest-api-head-tags-plugin\" rel=\"nofollow ugc\">Frontity Community Forum\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n","Adds all the meta tags of the head section to WordPress REST API responses, including the ones generated by SEO plugins like Yoast or All in One SEO.",18122,100,2,"2021-03-26T17:08:00.000Z","5.7.15","4.7","5.6",[27,28,29,30,31],"api","meta","rest","seo","yoast","http:\u002F\u002Fgithub.com\u002Ffrontity\u002Fwp-plugins","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Frest-api-head-tags.zip",0,null,"2026-03-15T15:16:48.613Z"]