{"id":282,"date":"2016-11-17T22:24:12","date_gmt":"2016-11-17T22:24:12","guid":{"rendered":"https:\/\/buddydev.com\/docs\/?p=282"},"modified":"2016-11-17T23:24:35","modified_gmt":"2016-11-17T23:24:35","slug":"using-post-meta-shortcode","status":"publish","type":"post","link":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/","title":{"rendered":"Using Post Meta Shortcode"},"content":{"rendered":"<p>Community Builder\u00a0provides great flexibility in setting up post meta using the post meta shortcodes. thugh these shortcodes can use used in any context(in the post loop), In community Builder theme we use it to set the display for archive posts header\/footer and single posts header\/footer. An example can be found at the bottom of this page.<\/p>\n<p>Available shortcodes:-<\/p>\n<ul>\n<li><a href='#author-name'>Display Author Name:- [author-name]<\/a><\/li>\n<li><a href='#author-posts-link'>Display Author Name and Links to Archive:- [author-posts-link]<\/a><\/li>\n<li><a href='#author-avatar'>Display Author Avatar:- [author-avatar]<\/a><\/li>\n<li><a href='#author-total-posts'>Display Author Total Posts :- [author-tottal-posts]<\/a><\/li>\n<li><a href='#post-date'>Display Post published Date:- [post-date]<\/a><\/li>\n<li><a href='#post-modified-date'>Display Post Modified Date:- [post-modified-date]<\/a><\/li>\n<li><a href='#post-time'>Display Post Publish \u00a0Time:- [post-time]<\/a><\/li>\n<li><a href='#post-modified-time'>Display Post Modified Time:- [post-modified-time]<\/a><\/li>\n<li><a href='#post-title'>Display Post Title:- [post-title]<\/a><\/li>\n<li><a href='#post-categories'>Display Post Categories:- [post-categories]<\/a><\/li>\n<li><a href='#post-tags'>Display Post Tags:- [post-tags]<\/a><\/li>\n<li><a href='#post-comment-link'>Display Post Comment Link:- [post-comment-link]<\/a><\/li>\n<li><a href='#post-meta'>Display any post meta key\/value:- [post-meta]<\/a><\/li>\n<\/ul>\n<h3 id='author-name'><strong>[author-name]<\/strong><\/h3>\n<h4>Usage:-<\/h4>\n<p>[author-name]<\/p>\n<p>Display the name of the author of current post.<\/p>\n<p>[author-name class=&#8217;pro-author&#8217;]<\/p>\n<p>Adds class &#8216;pro-author&#8217; to the generated html markup.<\/p>\n<p>&nbsp;<\/p>\n<h4>Options<\/h4>\n<h4>class<\/h4>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying author name. The default is\u00a0\u00a0&#8216;post-ahutor-name&#8217;<\/p>\n<p>&nbsp;<\/p>\n<h3 id='author-posts-link'><strong>[author-posts-link]<\/strong><\/h3>\n<h4>Usage:-<\/h4>\n<p>[author-posts-link]<\/p>\n<p>Display the\u00a0author name linked to the author archive page.<\/p>\n<p>[author-posts-link class=&#8217;pro-author-link&#8217;]<\/p>\n<p>Adds class &#8216;pro-author-link&#8217; to the generated html markup.<\/p>\n<h4>Options<\/h4>\n<h4>class<\/h4>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying linked post author name. The default is\u00a0\u00a0&#8216;post-author-link&#8217;<\/p>\n<p>&nbsp;<\/p>\n<h3 id='author-avatar'>[author-avatar]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[author-avatar]<\/p>\n<p>Display the avatar\u00a0of the author of current post linked to author archive page.<\/p>\n<p>[author-avatar class=&#8217;pro-author-avatar&#8217;]<\/p>\n<p>Adds class &#8216;pro-author-avatar&#8217; to the generated html markup.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying author name. The default is\u00a0\u00a0&#8216;post-ahutor-name&#8217;<\/p>\n<p><strong>size<\/strong><\/p>\n<p>(int) the size of avatar. default 32.<\/p>\n<p><strong>link<\/strong><\/p>\n<p>(int) (optional) Where to link avatar to the author archive page or not.<\/p>\n<h3 id='author-total-posts'>[author-total-posts]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[author-total-posts]<\/p>\n<p>Display the number of posts written by the current post author.<\/p>\n<p>[author-total-posts class=&#8217;pro-author-count&#8217;]<\/p>\n<p>Adds class &#8216;pro-author-count&#8217; to the generated html markup.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying count. The default is\u00a0\u00a0&#8216;post-author-total-posts-count&#8217;<\/p>\n<h3 id='post-date'>[post-date]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-date]<\/p>\n<p>Display the date when the post was published.<\/p>\n<p>[post-date format=&#8217;Fjy&#8217;]<\/p>\n<p>Display the post published date using the given format.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying date. The default is\u00a0\u00a0&#8216;post-date&#8217;<\/p>\n<p>format<\/p>\n<p>(string) (optional) PHP date format string. By default the format specified in WordPress settings.<\/p>\n<h3 id='post-modified-date'>[post-modified-date]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-modified-date]<\/p>\n<p>Display the date when the post last updated.<\/p>\n<p>[post-modified-date format=&#8217;Fjy&#8217;]<\/p>\n<p>Display the post latest modification\u00a0date using the given format.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying modified date. The default is\u00a0\u00a0&#8216;post-modified-date&#8217;<\/p>\n<p>format<\/p>\n<p>(string) (optional) PHP date format string. By default the format specified in WordPress settings.<\/p>\n<p>&nbsp;<\/p>\n<h3 id='post-time'>[post-time]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-time]<\/p>\n<p>Display the time\u00a0when the post was published.<\/p>\n<p>[post-time format=&#8217;Fjy&#8217;]<\/p>\n<p>Display the post published time\u00a0using the given format.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying time. The default is\u00a0\u00a0&#8216;post-time&#8217;<\/p>\n<p>format<\/p>\n<p>(string) (optional) PHP date format string.<\/p>\n<h3 id='post-modified-time'>[post-modified-time]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-modified-time]<\/p>\n<p>Display the date when the post last updated.<\/p>\n<p>[post-modified-time format=&#8217;Fjy&#8217;]<\/p>\n<p>Display the post latest modification\u00a0date using the given format.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup for displaying modified time. The default is\u00a0\u00a0&#8216;post-modified-time&#8217;<\/p>\n<p>format<\/p>\n<p>(string) (optional) PHP date format string.<\/p>\n<h3 id='post-title'>[post-title]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-title]<\/p>\n<p>Display the current post title.<\/p>\n<p>[post-title\u00a0\u00a0before_title='&lt;span class=&#8221;post-title&#8221;&gt;&#8217; after_title=&#8221;&lt;\/span&gt;&#8221;]<\/p>\n<p>Display the post title wrapped inside the specified before_title, after_title markup.<\/p>\n<h4>Options<\/h4>\n<p><strong>before_title<\/strong><\/p>\n<p>(string) (optional) The html markup\u00a0to be applied before the title. The default is\u00a0\u00a0&#8216;&lt;h1 class=&#8221;post-title&#8221;&gt;&#8217;<\/p>\n<p><strong>after_title<\/strong><\/p>\n<p>(string) (optional)\u00a0The end markup. default is &#8216;&lt;\/h1&gt;&#8217;<\/p>\n<h3 id='post-categories'>[post-categories]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-categories]<\/p>\n<p>Display the name of all the categories associated with the current post.<\/p>\n<p>[post-categories \u00a0before_title='&lt;span class=&#8221;post-title&#8221;&gt;&#8217; after_title=&#8221;&lt;\/span&gt;&#8221;]<\/p>\n<p>Display the post title wrapped inside the specified before_title, after_title markup.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup. The default is &#8216;post-categories&#8217;<\/p>\n<p><strong>separator<\/strong><\/p>\n<p>(string) (optional)\u00a0The\u00a0separator used while listing category. The default is comma(,)<\/p>\n<h3 id='post-tags'>[post-tags]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-tags]<\/p>\n<p>Display the name of all the tags\u00a0associated with the current post.<\/p>\n<p>[post-tags\u00a0 separator=&#8221;|&#8221;]<\/p>\n<p>Display the list of tags separated by the symbol &#8220;|&#8221;.<\/p>\n<h4>Options<\/h4>\n<p><strong>class<\/strong><\/p>\n<p>(string) (optional) The css class to be applied to the generated markup. The default is &#8216;post-tags&#8217;<\/p>\n<p><strong>separator<\/strong><\/p>\n<p>(string) (optional)\u00a0The\u00a0separator used while listing tags. The default is comma(,)<\/p>\n<h3 id='post-thumbnail'>[post-thumbnail]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-thumbnail]<\/p>\n<p>Display the post thumbnail used in current post.<\/p>\n<p>[post-thumbnail\u00a0 size=&#8221;thumbnail&#8221;]<\/p>\n<p>Use the named size thumbnail.<\/p>\n<h4>Options<\/h4>\n<p><strong>size<\/strong><\/p>\n<p>(string) (optional)\u00a0The name of one of the registered image size.<\/p>\n<h3 id='post-comment-link'>[post-comment-link]<\/h3>\n<h4>Usage:-<\/h4>\n<p>[post-comment-link]<\/p>\n<p>Display\u00a0comments link to comments for the current post.<\/p>\n<h4><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>Community Builder\u00a0provides great flexibility in setting up post meta using the post meta shortcodes. thugh these shortcodes can use used in any context(in the post loop), In community Builder theme we use it to set the display for archive posts header\/footer and single posts header\/footer. An example can be found at the bottom of this &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4478],"tags":[],"class_list":["clearfix","post-282","post","type-post","status-publish","format-standard","hentry","category-shortcodes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Post Meta Shortcode &#8226; BuddyDev Help Center<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Post Meta Shortcode &#8226; BuddyDev Help Center\" \/>\n<meta property=\"og:description\" content=\"Community Builder\u00a0provides great flexibility in setting up post meta using the post meta shortcodes. thugh these shortcodes can use used in any context(in the post loop), In community Builder theme we use it to set the display for archive posts header\/footer and single posts header\/footer. An example can be found at the bottom of this ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/\" \/>\n<meta property=\"og:site_name\" content=\"BuddyDev Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-17T22:24:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-11-17T23:24:35+00:00\" \/>\n<meta name=\"author\" content=\"Brajesh Singh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brajesh Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/\",\"url\":\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/\",\"name\":\"Using Post Meta Shortcode &#8226; BuddyDev Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#website\"},\"datePublished\":\"2016-11-17T22:24:12+00:00\",\"dateModified\":\"2016-11-17T23:24:35+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Post Meta Shortcode\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/buddydev.com\/docs\/#website\",\"url\":\"https:\/\/buddydev.com\/docs\/\",\"name\":\"BuddyDev Help Center\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/buddydev.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\",\"name\":\"Brajesh Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"caption\":\"Brajesh Singh\"},\"sameAs\":[\"http:\/\/buddydev.com\/members\/sbrajesh\/\",\"https:\/\/x.com\/sbrajesh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Post Meta Shortcode &#8226; BuddyDev Help Center","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/","og_locale":"en_US","og_type":"article","og_title":"Using Post Meta Shortcode &#8226; BuddyDev Help Center","og_description":"Community Builder\u00a0provides great flexibility in setting up post meta using the post meta shortcodes. thugh these shortcodes can use used in any context(in the post loop), In community Builder theme we use it to set the display for archive posts header\/footer and single posts header\/footer. An example can be found at the bottom of this ...","og_url":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/","og_site_name":"BuddyDev Help Center","article_published_time":"2016-11-17T22:24:12+00:00","article_modified_time":"2016-11-17T23:24:35+00:00","author":"Brajesh Singh","twitter_misc":{"Written by":"Brajesh Singh","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/","url":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/","name":"Using Post Meta Shortcode &#8226; BuddyDev Help Center","isPartOf":{"@id":"https:\/\/buddydev.com\/docs\/#website"},"datePublished":"2016-11-17T22:24:12+00:00","dateModified":"2016-11-17T23:24:35+00:00","author":{"@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/docs\/shortcodes\/using-post-meta-shortcode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Using Post Meta Shortcode"}]},{"@type":"WebSite","@id":"https:\/\/buddydev.com\/docs\/#website","url":"https:\/\/buddydev.com\/docs\/","name":"BuddyDev Help Center","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buddydev.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb","name":"Brajesh Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","contentUrl":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","caption":"Brajesh Singh"},"sameAs":["http:\/\/buddydev.com\/members\/sbrajesh\/","https:\/\/x.com\/sbrajesh"]}]}},"_links":{"self":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":7,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/282\/revisions\/297"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}