{"id":709,"date":"2017-09-25T17:20:41","date_gmt":"2017-09-25T17:20:41","guid":{"rendered":"https:\/\/buddydev.com\/docs\/?p=709"},"modified":"2022-06-08T21:53:11","modified_gmt":"2022-06-08T21:53:11","slug":"controlling-content-visibility-buddypress-member-types","status":"publish","type":"post","link":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/","title":{"rendered":"Controlling Content Visibility With BuddyPress Member Types"},"content":{"rendered":"<p>BuddyPress Member Types Pro comes with the following four shortcodes for content visibility.<\/p>\n<ul>\n<li>[bpmtp-show-if-member-type]<\/li>\n<li>[bpmtp-show-if-not-member-type]<\/li>\n<li>[bpmtp-hide-if-member-type]<\/li>\n<li>[bpmtp-hide-if-not-member-type]<\/li>\n<\/ul>\n<h3>Showing content based on BuddyPress member types:-<\/h3>\n<p>You can show content based on BuddyPress member types using the shortcode\u00a0<strong>[bpmtp-show-if-member-type]<\/strong>\u00a0. It will make contents visible only to the specified member type(s).<\/p>\n<h4><strong>Syntax:-<\/strong><\/h4>\n<p>[bpmtp-show-if-member-type in=&quot;one,more,member-type&quot;]Some content visible to these member types[\/bpmtp-show-if-member-type]<\/p>\n<h4><strong>Options:-<\/strong><\/h4>\n<ul>\n<li><strong>in<\/strong>:- string, one or more member type whom the content will be visible.<\/li>\n<\/ul>\n<h4><strong>Example:- Showing content to only student members.<\/strong><\/h4>\n<p>[bpmtp-show-if-member-type in=&quot;student&quot;] Hello Student, Welcome to Omega High. [\/bpmtp-show-if-member-type]<\/p>\n<h4><strong>Example:- Showing content to <em>teachers<\/em> and <em>staffs<\/em> only.<\/strong><\/h4>\n<p>[bpmtp-show-if-member-type in=&quot;teacher,staff&quot;]Hello there, welcome back to the new session. Some other content. [\/bpmtp-show-if-member-type]<\/p>\n<h3>Showing content if user does not have the specified member types:-<\/h3>\n<p>You can use the shortcode\u00a0<strong>[bpmtp-show-if-not-member-type] <\/strong>to show the content to the members who don&#8217;t have the specified member type.<\/p>\n<p><strong>Example:- Only showing to non student members<\/strong><\/p>\n<p>[bpmtp-show-if-not-member-type in=&quot;student&quot;] This will be visible to all members except students\u00a0[\/bpmtp-show-if-not-member-type]<\/p>\n<p>You can specify a comma separated list of more than one member types in the in clause.<\/p>\n<h3>Hiding content from specific member types:-<\/h3>\n<p>You can hide contents based on member types using the shortcode\u00a0<strong>[bpmtp-hide-if-member-type]. <\/strong>It allows you to hide contents from specified member types.<\/p>\n<p><strong>Example:- Hiding from students.<\/strong><\/p>\n<p>[bpmtp-hide-if-member-type in=&quot;student&quot;] It will be hidden from students.\u00a0[\/bpmtp-hide-if-member-type]<\/p>\n<p>Yes, it is same as bpmtp-show-if-not-member-type.<\/p>\n<h3>Hiding content if user does not have specified member type:-<\/h3>\n<p>You can hide contents from users who don&#8217;t have one or more specified member types using the\u00a0<strong>[bpmtp-hide-if-not-member-type]<\/strong> shortcode.<\/p>\n<p><strong>Example:-\u00a0<\/strong><\/p>\n<p>[bpmtp-hide-if-not-member-type in=&quot;student&quot; Hidden from everyone except student. [\/bpmtp-hide-if-not-member-type]<\/p>\n<p>Yes, it is exactly same as [bpmtp-show-if-member-type] shortcode.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BuddyPress Member Types Pro comes with the following four shortcodes for content visibility. [bpmtp-show-if-member-type] [bpmtp-show-if-not-member-type] [bpmtp-hide-if-member-type] [bpmtp-hide-if-not-member-type] Showing content based on BuddyPress member types:- You can show content based on BuddyPress member types using the shortcode\u00a0[bpmtp-show-if-member-type]\u00a0. It will make contents visible only to the specified member type(s). Syntax:- [bpmtp-show-if-member-type in=&quot;one,more,member-type&quot;]Some content visible to these member &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9307],"tags":[],"class_list":["clearfix","post-709","post","type-post","status-publish","format-standard","hentry","category-buddypress-member-types-pro"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Controlling Content Visibility With BuddyPress Member Types &#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\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Controlling Content Visibility With BuddyPress Member Types &#8226; BuddyDev Help Center\" \/>\n<meta property=\"og:description\" content=\"BuddyPress Member Types Pro comes with the following four shortcodes for content visibility. [bpmtp-show-if-member-type] [bpmtp-show-if-not-member-type] [bpmtp-hide-if-member-type] [bpmtp-hide-if-not-member-type] Showing content based on BuddyPress member types:- You can show content based on BuddyPress member types using the shortcode\u00a0[bpmtp-show-if-member-type]\u00a0. It will make contents visible only to the specified member type(s). Syntax:- [bpmtp-show-if-member-type in=&quot;one,more,member-type&quot;]Some content visible to these member ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/\" \/>\n<meta property=\"og:site_name\" content=\"BuddyDev Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-25T17:20:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-08T21:53:11+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/\",\"url\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/\",\"name\":\"Controlling Content Visibility With BuddyPress Member Types &#8226; BuddyDev Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#website\"},\"datePublished\":\"2017-09-25T17:20:41+00:00\",\"dateModified\":\"2022-06-08T21:53:11+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Controlling Content Visibility With BuddyPress Member Types\"}]},{\"@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":"Controlling Content Visibility With BuddyPress Member Types &#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\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/","og_locale":"en_US","og_type":"article","og_title":"Controlling Content Visibility With BuddyPress Member Types &#8226; BuddyDev Help Center","og_description":"BuddyPress Member Types Pro comes with the following four shortcodes for content visibility. [bpmtp-show-if-member-type] [bpmtp-show-if-not-member-type] [bpmtp-hide-if-member-type] [bpmtp-hide-if-not-member-type] Showing content based on BuddyPress member types:- You can show content based on BuddyPress member types using the shortcode\u00a0[bpmtp-show-if-member-type]\u00a0. It will make contents visible only to the specified member type(s). Syntax:- [bpmtp-show-if-member-type in=&quot;one,more,member-type&quot;]Some content visible to these member ...","og_url":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/","og_site_name":"BuddyDev Help Center","article_published_time":"2017-09-25T17:20:41+00:00","article_modified_time":"2022-06-08T21:53:11+00:00","author":"Brajesh Singh","twitter_misc":{"Written by":"Brajesh Singh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/","url":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/","name":"Controlling Content Visibility With BuddyPress Member Types &#8226; BuddyDev Help Center","isPartOf":{"@id":"https:\/\/buddydev.com\/docs\/#website"},"datePublished":"2017-09-25T17:20:41+00:00","dateModified":"2022-06-08T21:53:11+00:00","author":{"@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/controlling-content-visibility-buddypress-member-types\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Controlling Content Visibility With BuddyPress Member Types"}]},{"@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\/709","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=709"}],"version-history":[{"count":11,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/709\/revisions"}],"predecessor-version":[{"id":3033,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/709\/revisions\/3033"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/media?parent=709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/categories?post=709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/tags?post=709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}