MyListing Club

Hide Content When Logged Out

Building better MyListing websites. One code snippet at a time.

Overview

The Hide Content When Logged Out code snippet easily hides elements until your users log into your MyListing website.

Implementation

  1. Grab the code snippet.
  2. Follow the provided instructions.
  3. Save your changes.
				
					//// INSTRUCTIONS: 
//// 1. Copy and paste the code snippet below into Theme Tools > Theme Options > Custom Code > CSS.
//// 2. Add the 'hideifloggedout' class to any element you wish to hide.

--------------------------- CODE SNIPPET IS BELOW THIS LINE --------------------------- 

/* HIDE CONTENT WHEN LOGGED OUT */
body:not(.logged-in) .hideifloggedout {
    display: none !important;
}