{"id":108266,"date":"2019-08-28T04:41:20","date_gmt":"2019-08-28T04:41:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/learndash-visibility-control\/"},"modified":"2025-09-11T07:23:44","modified_gmt":"2025-09-11T07:23:44","slug":"visibility-control-for-learndash","status":"publish","type":"plugin","link":"https:\/\/sr.wordpress.org\/plugins\/visibility-control-for-learndash\/","author":11471625,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.7","stable_tag":"trunk","tested":"6.8.5","requires":"4.0","requires_php":"5.6","requires_plugins":null,"header_name":"Visibility Control for LearnDash","header_author":"Next Software Solutions","header_description":"Control visibility of HTML elements, menus, and other details on your website based on User's access to specific LearnDash Course. Add CSS class: visible_to_course_123 to show the element\/menu item to user with access to Course with ID 123. Add CSS Class: hidden_to_course_123 to hide the element from user with access to Course with ID 123. Add CSS class: visible_to_logged_in to show the element\/menu item to a logged in user. Add CSS class: hidden_to_logged_in or visible_to_logged_out to show the element\/menu item to a logged out users. Currently, this will only hide the content using CSS.","assets_banners_color":"a1dbff","last_updated":"2025-09-11 07:23:44","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.nextsoftwaresolutions.com\/learndash-visibility-control","header_author_uri":"https:\/\/www.nextsoftwaresolutions.com","rating":5,"author_block_rating":0,"active_installs":1000,"downloads":14297,"num_ratings":10,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":10},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":2146785,"resolution":"256x256","location":"assets","locale":""},"icon-512x512.png":{"filename":"icon-512x512.png","revision":2146785,"resolution":"512x512","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2146785,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2146785,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2593885,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2593885,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2593885,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2593885,"resolution":"4","location":"assets","locale":""}},"screenshots":{"1":"Show menu only to Logged In user (or Course\/Group access)","2":"Show menu only to Loggout user","3":"Show a message if user has access to course (using HTML anywhere)","4":"Show a message if user doesn't have access to course (using Additional CSS class)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[18342,1244,5237,10796,2195],"plugin_category":[],"plugin_contributors":[175544],"plugin_business_model":[],"class_list":["post-108266","plugin","type-plugin","status-publish","hentry","plugin_tags-elearning","plugin_tags-hide","plugin_tags-hide-content","plugin_tags-learndash","plugin_tags-lms","plugin_contributors-liveaspankaj","plugin_committers-liveaspankaj"],"banners":{"banner":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/banner-772x250.png?rev=2146785","banner_2x":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/banner-1544x500.png?rev=2146785","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/icon-256x256.png?rev=2146785","icon_2x":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/icon-256x256.png?rev=2146785","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/screenshot-1.png?rev=2593885","caption":"Show menu only to Logged In user (or Course\/Group access)"},{"src":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/screenshot-2.png?rev=2593885","caption":"Show menu only to Loggout user"},{"src":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/screenshot-3.png?rev=2593885","caption":"Show a message if user has access to course (using HTML anywhere)"},{"src":"https:\/\/ps.w.org\/visibility-control-for-learndash\/assets\/screenshot-4.png?rev=2593885","caption":"Show a message if user doesn't have access to course (using Additional CSS class)"}],"raw_content":"<!--section=description-->\n<p>Visibility Control for <a href=\"https:\/\/www.nextsoftwaresolutions.com\/r\/learndash\/wp_vcl_plugin_page\">LearnDash<\/a> helps you hide messages and content for specific criterion anywhere on your WordPress page.<\/p>\n\n<p>You can show\/hide HTML elements, menus, and other details based on:\n1. User's access to a particular, any or all <strong>LearnDash Course<\/strong>, Or\n2. User's access to a particular, any or all <strong>LearnDash Group<\/strong>, Or\n3. User is <strong>Logged In<\/strong> or <strong>Logged Out<\/strong>.\n4. User's role.<\/p>\n\n<p>You simply need to add a CSS class to your element div or span. As explained here:<\/p>\n\n<p><strong>Example:<\/strong><\/p>\n\n<p>Login\/Logout Status:<\/p>\n\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\n<p>For user's role:\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>\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\n<p>For all the courses:<\/p>\n\n<ul>\n<li>To show the element\/menu item to user with access to all the Courses, add this CSS class: <strong>visible_to_course_all<\/strong><\/li>\n<li>To hide the element\/menu item from user with access to all the Courses, add this CSS class: <strong>hidden_to_course_all<\/strong><\/li>\n<li>To show the element\/menu item to users not enrolled in any Course, add this CSS class: <strong>visible_to_course_none<\/strong><\/li>\n<li>To hide the element\/menu item from users not enrolled in any Course, add this CSS class: <strong>hidden_to_course_none<\/strong><\/li>\n<\/ul>\n\n<p>For a specific course, if Course ID is 123:<\/p>\n\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<\/ul>\n\n<p>For users with access to at least one course:\n* Add this CSS class: <strong>hidden_to_course_none<\/strong><\/p>\n\n<p>For a course completion status, if Course ID is 123:<\/p>\n\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\n<p>For all the groups:<\/p>\n\n<ul>\n<li>To show the element\/menu item to user with access to all the groups, add this CSS class: <strong>visible_to_group_all<\/strong><\/li>\n<li>To hide the element\/menu item from user with access to all the groups, add this CSS class: <strong>hidden_to_group_all<\/strong><\/li>\n<li>To show the element\/menu item to users not enrolled in any group, add this CSS class: <strong>visible_to_group_none<\/strong><\/li>\n<li>To hide the element\/menu item from users not enrolled in any group, add this CSS class: <strong>hidden_to_group_none<\/strong><\/li>\n<\/ul>\n\n<p>For a specific group, if Group ID is 123:<\/p>\n\n<ul>\n<li>To show the element\/menu item to user with access to above Group, add this CSS class: <strong>visible_to_group_123<\/strong><\/li>\n<li>To hide the element\/menu item from user with access to above Group, add this CSS class: <strong>hidden_to_group_123<\/strong><\/li>\n<\/ul>\n\n<p>For users with access to at least one group:\n* Add this CSS class: <strong>hidden_to_group_none<\/strong><\/p>\n\n<p><strong>Mechanism of Functioning<\/strong><\/p>\n\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_group_123 visible_to_group_124 will show the element only to those who have access to both groups.<\/li>\n<li>Hidden data\/elements reaches the browser. Though user's 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't be available even on Inspect.<\/li>\n<li>Elements rendered after the page load are hidden but not removed from DOM\/page.<\/li>\n<\/ul>\n\n<p><strong>Future Development<\/strong><\/p>\n\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\n<p><strong>Other Visibility Control Plugins:<\/strong>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/learndash-visibility-control\/\">Visibility Control for LearnDash LMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-wp-courseware\/\">Visibility Control for WP Courseware LMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-learnpress\/\">Visibility Control for LearnPress LMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-controlfor-lifterlms\/\">Visibility Control for LifterLMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-tutorlms\/\">Visibility Control for TutorLMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-masterstudy\/\">Visibility Control for MasterStudyLMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/visibility-control-for-sensei\/\">Visibility Control for Sensei LMS<\/a>\n- <a href=\"https:\/\/www.nextsoftwaresolutions.com\/woocommerce-visibility-control\/\">Visibility Control for WooCommerce<\/a><\/p>\n\n<p><strong>Related Plugins for LearnDash LMS:<\/strong>\n* <a href=\"https:\/\/www.nextsoftwaresolutions.com\/manual-completions-for-learndash\/\">Manual Completions for LearnDash LMS<\/a>\n* <a href=\"https:\/\/www.nextsoftwaresolutions.com\/manage-enrollment-for-learndash\/\">Manage Enrollment for LearnDash LMS<\/a>\n* <a href=\"https:\/\/www.nextsoftwaresolutions.com\/autocomplete-learndash-lessons-and-topics\/\">Autocomplete LearnDash Lessons and Topics<\/a><\/p>\n\n<p>It is pretty similar to this plugin and having same features, it allows controlling the visibility of HTML elements based user's purchase of a particular WooCommerce Product or Variation.<\/p>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<p>e.g.<\/p>\n\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/visibility-control-for-learndash<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Add the CSS classes to your HTML elements or Menu Items as described in the Details section.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20is%20learndash%20lms%3F'><h3>What is LearnDash LMS?<\/h3><\/dt>\n<dd><p><a href=\"https:\/\/www.nextsoftwaresolutions.com\/r\/learndash\/wp_vcl_plugin_page\">LearnDash LMS<\/a> is the number one WordPress based Learning Management System (LMS) plugin. It includes many advanced features including, quizzing engine, course management, reports, certificates and payment methods.<\/p>\n\n<p>You can also add <a href=\"https:\/\/www.nextsoftwaresolutions.com\/grassblade-xapi-companion\/\">GrassBlade xAPI Companion plugin<\/a> and <a href=\"https:\/\/www.nextsoftwaresolutions.com\/grassblade-lrs-experience-api\/\">GrassBlade LRS<\/a> to start using Experience API (xAPI) based contents with <a href=\"https:\/\/www.nextsoftwaresolutions.com\/r\/learndash\/wp_vcl_plugin_page\">LearnDash LMS<\/a>.<\/p><\/dd>\n<dt id='what%20is%20grassblade%20xapi%20companion%20plugin%3F'><h3>What is GrassBlade xAPI Companion plugin?<\/h3><\/dt>\n<dd><p><a href=\"https:\/\/www.nextsoftwaresolutions.com\/grassblade-xapi-companion\/\">GrassBlade xAPI Companion<\/a> is a paid WordPress plugin that enables support for Experience API (xAPI)  based content on WordPress.<\/p>\n\n<p>It also provides best in industry Advanced Video Tracking feature, that works with YouTube, Vimeo and self-hosted MP4 videos. Tracking of MP3 audios is also supported.<\/p>\n\n<p>It can be used independently without any LMS. However, to add advanced features, it also has integrations with several LMSes.<\/p><\/dd>\n<dt id='what%20is%20grassblade%20cloud%20lrs%3F'><h3>What is GrassBlade Cloud LRS?<\/h3><\/dt>\n<dd><p><a href=\"https:\/\/www.nextsoftwaresolutions.com\/grassblade-lrs-experience-api\/\">GrassBlade Cloud LRS<\/a> is a cloud-based Learning Record Store (LRS). An LRS is a required component in any xAPI-based ecosystem. It works as a data store of all eLearning data, as well as a reporting and analysis platform.  There is an installable version which can be installed on any PHP\/MySQL based server.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.7<\/h4>\n\n<ul>\n<li>Feature: Added support for course completion status: Example: visible_to_course_complete_123, visible_to_course_incomplete_123, hidden_to_course_complete_123, hidden_to_course_incomplete_123<\/li>\n<\/ul>\n\n<h4>1.6<\/h4>\n\n<ul>\n<li>Feature: Added support for roles: Example: visible_to_role_administrator<\/li>\n<li>Fixed: issues on addons page on network website.<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Fixed: jQuery 3.0 conflict on some websites.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Feature: Added new classes: visible_to_course_none, hidden_to_course_none, visible_to_course_all, hidden_to_course_all, visible_to_group_none, hidden_to_group_none, visible_to_group_all, hidden_to_group_all<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Improvement: Compatible with different editors now: Gutenberg, WPBakery Builder, Visual Composer, Elementor, Brizy Builder, Beaver Builder, Divi<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Feature: Added support for LearnDash Groups. (.visible_to_group_123, .hidden_to_group_123)<\/li>\n<li>Feature: Hidden elements are now removed after page is loaded (using jQuery, if available)<\/li>\n<li>Improvement: Added to LearnDash menu<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added Add-ons page<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<p>Fixed: Not working due to wrong action<\/p>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Disabled checking from wp-admin area to avoid block from getting hidden from the editor<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<p>Fix: Disable the visiblity functionality when LearnDash is not installed<\/p>","raw_excerpt":"Visibility Control for LearnDash helps you hide messages and content for specific criterion anywhere on your WordPress page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/108266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=108266"}],"author":[{"embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/liveaspankaj"}],"wp:attachment":[{"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=108266"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=108266"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=108266"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=108266"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=108266"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=108266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}