I have what seems like a pretty straightforward Structure navigation menu, but for some reason, the entries that "Hide from Nav?" set to "Yes" are still displaying in the navigation.
The page is even labelled as "(hidden)" in the Structure interface, but still it shows up in the navigation.
Is there something wrong with my code?
<div class="nav-menu">
{exp:structure_entries depth="2" current_class="active"}
{if {count} ==1}<ul id="top-nav" {if {current+child}==1}class="active" {/if}>{/if}
{if {depth} == 1}
{!-- Top Level --}
<li>
<a href="#">{title}</a>
{if {children_total} == 0}{!-- No Children - so close markup --}</li>{/if}
{if:else}{!-- Children (not top level) --}
{if {sibling_count} == 1}
{!-- First child - so open markup --}
<div class="subnav-dropdown">
<ul class="level{depth} subnav">
{/if}
<li>
<a href="{page_uri}">{title}</a>
{close_markup}
{if {total_children} == 0 || {depth} == {restricted_depth}}</li>{/if}
{if {last_sibling} && {sibling_count} == {sibling_total}}
</ul>
</div>
</li>{/if}
{/close_markup}{/if}
{if {count}=={total_results}}</ul>{/if}
{/exp:structure_entries}
</div>