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
<?php | |
$terms = get_terms("tribe_events_cat", array( | |
'parent' => 0, | |
)); | |
//print_r ($terms); | |
// $terms = ($terms [parent] => 0 ); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
echo '<ul class="events-cat-menu">'; | |
?> |
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
<?php | |
$terms = get_terms("tribe_events_cat", array( | |
'parent' => 0, | |
)); | |
//print_r ($terms); | |
// $terms = ($terms [parent] => 0 ); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
echo '<ul class="events-cat-menu">'; | |
?> |
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
$(document).ready(function() { | |
// Get current url | |
// Select an a element that has the matching href and apply a class of 'active'. Also prepend a - to the content of the link | |
var url = window.location.href; | |
$('#main-menu a[href="'+url+'"]').addClass('current_page_item'); | |
}); |