Skip to content

Commit 0eec329

Browse files
sigorillascottgonzalez
authored andcommitted
learn.jquery.com: Change sidebar highlighting for top categories
Closes jquerygh-345
1 parent fb412d5 commit 0eec329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

themes/learn.jquery.com/sidebar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ul>
1313
<?php $chapters = learn_chapter_listing(); ?>
1414
<?php while ( $chapters->have_posts() ) : $chapters->the_post(); ?>
15-
<?php $is_active = ($active_post->ID == $chapters->post->ID); ?>
15+
<?php $is_active = ($active_post->ID == $chapters->post->ID) || ($active_post->post_parent == $chapters->post->ID); ?>
1616
<li <?php if ($is_active) { echo "class='active'"; } ?>>
1717
<a href="<?php the_permalink(); ?>">
1818
<?php if ( get_post_meta( $post->ID, "icon" ) ) : ?>

0 commit comments

Comments
 (0)