{"id":1281,"date":"2023-10-27T09:42:26","date_gmt":"2023-10-27T09:42:26","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=1281"},"modified":"2023-10-27T09:42:27","modified_gmt":"2023-10-27T09:42:27","slug":"head-meta-data","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/head-meta-data\/","title":{"rendered":"Head Meta Data Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Head Meta Data Shortcodes<\/strong> to your WordPress website, including their <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Head Meta Data Plugin shortcodes not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Head Meta Data Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/head-meta-data\/assets\/icon-128x128.png?rev=1472531\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/head-meta-data\" target=\"_blank\" rel=\"noopener\">\n                        Head Meta Data                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Head Meta Data is a WordPress plugin designed to manage and enhance the meta data of your website. It seamlessly injects essential SEO-friendly meta tags into your site&#039;s header.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2606<\/span> (18)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 20000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.3.2            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 5.6.20            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[head_meta_data]<\/li><li>[hmd_custom]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Head Meta Data [head_meta_data] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8216;head_meta_data&#8217; shortcode is a function in PHP that retrieves and displays content. This shortcode is used within WordPress plugins.\n\n\n\nThis shortcode calls the &#8216;hmd_shortcode&#8217; function, which fetches meta data via the &#8216;hmd_display_content&#8217; function. It then replaces any greater than or less than symbols with their HTML entities, ensuring the content is displayed correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[head_meta_data]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic Example<\/strong> &#8211; Provides a simple way to display meta data using the &#8216;head_meta_data&#8217; shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[head_meta_data \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[head_meta_data]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('head_meta_data','hmd_shortcode');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction hmd_shortcode() {\n\t\n\t$get_meta_data = hmd_display_content();\n\t\n\t$the_meta_data = str_replace(array(&#039;&gt;&#039;, &#039;&lt;&#039;), array(&#039;&amp;gt;&#039;,&#039;&amp;lt;&#039;), $get_meta_data);\n\t\n\treturn $the_meta_data;\n\t\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">head-meta-data\/head-meta-data\/head-meta-data.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Head Meta Data [hmd_custom] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8216;hmd_custom&#8217; shortcode from the Head Meta Data plugin is used to retrieve and display custom data stored in the plugin&#8217;s options. \n\n\n\nThe function &#8216;hmd_custom_shortcode&#8217; checks if there&#8217;s any custom data set in the plugin&#8217;s options. If there is, it retrieves this data, replaces any greater than or less than symbols with their HTML entities, and returns the modified data. This allows for safe display of the custom data on the frontend.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[hmd_custom]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A straightforward usage of the &#8216;hmd_custom&#8217; shortcode without any parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[hmd_custom \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[hmd_custom]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('hmd_custom','hmd_custom_shortcode');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction hmd_custom_shortcode() {\n\t\n\tglobal $hmd_options;\n\t\n\tif ($hmd_options&#91;&#039;hmd_custom&#039;] !== &#039;&#039;) {\n\t\t\n\t\t$get_custom_data = $hmd_options&#91;&#039;hmd_custom&#039;];\n\t\t\n\t\t$the_custom_data = &quot;\\t\\t&quot; . str_replace(array(&#039;&gt;&#039;, &#039;&lt;&#039;), array(&#039;&amp;gt;&#039;,&#039;&amp;lt;&#039;), $get_custom_data);\n\t\t\n\t\treturn $the_custom_data;\n\t\t\n\t}\n\t\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">head-meta-data\/head-meta-data\/head-meta-data.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Head Meta Data Plugin shortcodes<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Head Meta Data Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Head Meta Data Plugin shortcodes not to show or not to work correctly. Before starting, here is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Head Meta Data","slug":"","version":"20230715","author":"<a href=\"https:\/\/plugin-planet.com\/\">Jeff Starr<\/a>","icons":"https:\/\/ps.w.org\/head-meta-data\/assets\/icon-128x128.png?rev=1472531","plugin_tags":"{\"head\":\"head\",\"header\":\"header\",\"meta\":\"meta\",\"metadata\":\"metadata\",\"tags\":\"tags\"}","author_profile":"https:\/\/profiles.wordpress.org\/specialk\/","requires":"4.6","tested":"6.3.2","requires_php":"5.6.20","rating":96,"num_ratings":18,"active_installs":20000,"downloaded":343081,"last_updated":"2023-07-15 11:14pm GMT","added":"2012-11-14","homepage":"https:\/\/perishablepress.com\/head-metadata-plus\/","short_description":"Adds a custom set of &lt;meta&gt; tags to the &lt;head&gt; section of all posts &amp; pages.","description":"\"Head Meta Data is a WordPress plugin designed to manage and enhance the meta data of your website. It seamlessly injects essential SEO-friendly meta tags into your site's header.\"","shortcodes":"[\"head_meta_data\",\"hmd_custom\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1281","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=1281"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1281\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1281\/revisions\/1553"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=1281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=1281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=1281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}