Created
December 18, 2019 23:04
-
-
Save dospuntocero/9ce70b39a276dad9546325621a95866b to your computer and use it in GitHub Desktop.
child menu with current class using sage roots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="secondary-nav"> | |
<ul> | |
@foreach($child_menu as $child) | |
<li @if(wp_make_link_relative(get_permalink($child->ID)) == $current_url)class="is-active" @endif> | |
<a href="{!! get_permalink($child->ID) !!}">{{$child->post_title}}</a> | |
</li> | |
@endforeach | |
</ul> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment