{"id":408004,"date":"2024-09-14T08:00:00","date_gmt":"2024-09-14T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/visibility-control-for-sensei\/"},"modified":"2025-09-11T15:42:00","modified_gmt":"2025-09-11T15:42:00","slug":"visibility-control-for-sensei","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/visibility-control-for-sensei\/","title":{"rendered":"Visibility Control for Sensei LMS"},"content":{"rendered":"<p>Visibility Control for Sensei helps you hide messages and content for specific criterion anywhere on your WordPress page.<\/p>\n<p>You can show\/hide HTML elements, menus, and other details based on:<br \/>\n1. User\u2019s access to a particular <strong>Sensei LMS Course<\/strong>,<br \/>\n2. User\u2019s course completion status of a particular <strong>Sensei LMS Course<\/strong>, Or<br \/>\n3. User is <strong>Logged In<\/strong> or <strong>Logged Out<\/strong>.<br \/>\n4. User\u2019s role.<\/p>\n<p>You simply need to add a CSS class to your element div or span. As explained here:<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Login\/Logout Status:<\/p>\n<ul>\n<li>To show the element\/menu item to a logged-in user, add this CSS class: <strong>visible_to_logged_in<\/strong> OR  <strong>hidden_to_logged_out<\/strong><\/li>\n<li>To hide the element\/menu item from a logged-in user, add this CSS class: <strong>visible_to_logged_out<\/strong> OR  <strong>hidden_to_logged_in<\/strong><\/li>\n<\/ul>\n<p>For user\u2019s role:<br \/>\n* To show the element\/menu item to a user will role administrator, add this CSS class: <strong>visible_to_role_administrator<\/strong> OR <strong>hidden_to_role_administrator<\/strong><br \/>\n* Note: To show an element to multiple specific roles only, you need add the element multiple times, one for each role. To hide an element\/menu from specific multiple roles only you can add the element once add multiple classes to the same element.<\/p>\n<p>If Course ID is 123<\/p>\n<ul>\n<li>To show the element\/menu item to user with access to above Course, add this CSS class: <strong>visible_to_course_123<\/strong><\/li>\n<li>To hide the element\/menu item from user with access to above Course, add this CSS class: <strong>hidden_to_course_123<\/strong><\/li>\n<li>To show the element\/menu item to a logged-in user, add this CSS class: <strong>visible_to_logged_in<\/strong> OR  <strong>hidden_to_logged_out<\/strong><\/li>\n<li>To hide the element\/menu item from a logged-in user, add this CSS class: <strong>visible_to_logged_out<\/strong> OR  <strong>hidden_to_logged_in<\/strong><\/li>\n<\/ul>\n<p>For a course completion status, if Course ID is 123:<\/p>\n<ul>\n<li>To show the element\/menu item to user who completed above course, add this CSS class: <strong>visible_to_course_complete_123<\/strong><\/li>\n<li>To hide the element\/menu item from user who completed above course, add this CSS class: <strong>hidden_to_course_complete_123<\/strong><\/li>\n<li>To show the element\/menu item to user who has not completed above course, add this CSS class: <strong>visible_to_course_incomplete_123<\/strong><\/li>\n<li>To hide the element\/menu item from user who has not completed above course, add this CSS class: <strong>hidden_to_course_incomplete_123<\/strong><\/li>\n<\/ul>\n<p><strong>Mechanism of Functioning<\/strong><\/p>\n<ul>\n<li><strong>Multiple CSS Classes:<\/strong> If multiple visibility control classes are added, ALL of them must meet the criterion to keep the element visible. If any one of them hides the element, it will be hidden. For example: visible_to_course_123 visible_to_course_124 will show the element only to those who have access to both courses.<\/li>\n<li>Hidden data\/elements reaches the browser. Though user\u2019s do not see it.<\/li>\n<li>CSS is added to the page for all CSS elements that needs to be hidden based on above rules.<\/li>\n<li>After page is loaded. These elements are removed from page using jQuery (if available), so it won\u2019t be available on Inspect.<\/li>\n<li>Elements rendered after the page load are hidden but not removed from DOM\/page.<\/li>\n<\/ul>\n<p><strong>Future Development<\/strong><\/p>\n<p>Depending on the interest in this feature, we will decide on adding a shortcode and\/or a Gutenberg Block to achieve this feature.<\/p>\n<p><strong>Other Visibility Control Plugins:<\/strong><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/learndash-visibility-control\/\" rel=\"nofollow ugc\">Visibility Control for LearnDash LMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-wp-courseware\/\" rel=\"nofollow ugc\">Visibility Control for WPCourseware LMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-learnpress\/\" rel=\"nofollow ugc\">Visibility Control for LearnPress LMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-controlfor-lifterlms\/\" rel=\"nofollow ugc\">Visibility Control for LifterLMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-tutorlms\/\" rel=\"nofollow ugc\">Visibility Control for TutorLMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-sensei\/\" rel=\"nofollow ugc\">Visibility Control for Sensei LMS<\/a><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/woocommerce-visibility-control\/\" rel=\"nofollow ugc\">Visibility Control for WooCommerce<\/a><\/p>\n<p><strong>Related Plugins for Sensei LMS:<\/strong><br \/>\n\u2013 <a href=\"https:\/\/www.nextsoftwaresolutions.com\/experience-api-for-sensei-lms\/\" rel=\"nofollow ugc\">Experience API for Sensei LMS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visibility Control for Sensei LMS helps you hide messages and content for specific criterion anywhere on your WordPress page.<\/p>\n","protected":false},"author":65,"featured_media":408005,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Visibility Control for Sensei LMS - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Visibility Control for Sensei LMS helps you hide messages and content for specific criterion anywhere on your WordPress page."},"footnotes":""},"categories":[1],"tags":[1032,9256,55290,1007,14957],"class_list":["post-408004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-elearning","tag-hide-content","tag-hide-message","tag-lms","tag-sensei"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/408004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=408004"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/408004\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/408005"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=408004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=408004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=408004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}