• Resolved Jake Reimer

    (@jake-reimer)


    I would like to know how to hide the sidebar for users that are logged in. If anyone could please help that would be great! Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Jake. I haven’t tested this but seems like the easiest solution would be to just do a return when the sidebar is called. Using a child theme, copy sidebar.php to your child theme. Then modify the code at the top of the file to look like this:

    <?php 
    
    	if ( is_user_logged_in() ) {
      		return;
    	}
    
    	$sidebar = alx_sidebar_primary();
    	$layout = alx_layout_class();
    	if ( $layout != 'col-1c'):
    ?>

    Hi Jake. Just checking to see if you need any more help with this topic. If not, please mark it as Resolved. Thanks.

    Thread Starter Jake Reimer

    (@jake-reimer)

    Thank you it is all well!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide Sidebar’ is closed to new replies.