Menu icon Foundation
"Uncomment this line if using the Off-Canvas Menu"

In JointsWP's header.php file (I'm using the CSS version), there's a puzzling comment on line 37 ('Uncomment this line...'):

	</head>
	
	<!-- Uncomment this line if using the Off-Canvas Menu --> 
		
	<body <?php body_class(); ?>>

		<div class="off-canvas-wrapper">
							
			<?php get_template_part( 'parts/content', 'offcanvas' ); ?>
			
			<div class="off-canvas-content" data-off-canvas-content>
				
				<header class="header" role="banner">
						
					 <!-- This navs will be applied to the topbar, above all content 
						  To see additional nav styles, visit the /parts directory -->
					 <?php get_template_part( 'parts/nav', 'offcanvas-topbar' ); ?>
	 	
				</header> <!-- end .header -->

Any idea what it's supposed to refer to?

My main content is thus always contained in the off-canvas divs. It doesn't seem to do any harm, but I'm sure that's not what was intended. I'm not using an off-canvas menu.

Thank you for any info!

jointswpoff-canvas-menu

In JointsWP's header.php file (I'm using the CSS version), there's a puzzling comment on line 37 ('Uncomment this line...'):

	</head>
	
	<!-- Uncomment this line if using the Off-Canvas Menu --> 
		
	<body <?php body_class(); ?>>

		<div class="off-canvas-wrapper">
							
			<?php get_template_part( 'parts/content', 'offcanvas' ); ?>
			
			<div class="off-canvas-content" data-off-canvas-content>
				
				<header class="header" role="banner">
						
					 <!-- This navs will be applied to the topbar, above all content 
						  To see additional nav styles, visit the /parts directory -->
					 <?php get_template_part( 'parts/nav', 'offcanvas-topbar' ); ?>
	 	
				</header> <!-- end .header -->

Any idea what it's supposed to refer to?

My main content is thus always contained in the off-canvas divs. It doesn't seem to do any harm, but I'm sure that's not what was intended. I'm not using an off-canvas menu.

Thank you for any info!

Hari Harker over 2 years ago

Off the top of my mind, I guess they would have kept Off Canvas to render responsive menu/navigation bar when you switch over to medium (tablet) screens or small (mobile) screens. 

Also, I guess the "Uncomment this line" is meant to uncomment all the comments made for your Off Canvas to work fine. You would understand better if you uncomment, reload the page and reduce your browser window size to see the differences that Off Canvas provides in medium and small screen resolutions.

Ariel Frailich over 2 years ago

But there is nothing to uncomment, except the comment line itself. Hence my question: what could the author have meant to comment out, but didn't? I don't see anything that makes sense to leave out. The </header> line is the end of the file.

Maxwell Morgan over 2 years ago

Honestly it just looks like an accidental line that was left in there.

Here is the commit where that line was introduced.

You can see the history of the file through these commits, but from the time it was introduced until the latest commit it doesn't seem like it was ever referring to a commented out line (aside from a broken comment that only had one slash, which was removed same day).

All in all, it means nothing - just something to mess with your brain. :(

Ariel Frailich about 2 years ago

 Ahhh, the commit in which it was introduced hints at the answer. It looks like it was referring to the get_template_part line immediately following it, which presumably had been commented out in the past. At some later point, the approach changed, as evidenced by the two 'off-canvas...' divs in the current version.

Thank you for helping to clear this up!