File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 12
12
<ul>
13
13
<?php $ chapters = learn_chapter_listing (); ?>
14
14
<?php while ( $ chapters ->have_posts () ) : $ chapters ->the_post (); ?>
15
- <?php $ is_active = ($ active_post ->ID == $ chapters ->post ->ID ) || ( $ active_post -> post_parent == $ chapters -> post -> ID ) ; ?>
15
+ <?php $ is_active = ($ active_post ->ID == $ chapters ->post ->ID ); ?>
16
16
<li <?php if ($ is_active ) { echo "class='active' " ; } ?> >
17
17
<a href="<?php the_permalink (); ?> ">
18
18
<?php if ( get_post_meta ( $ post ->ID , "icon " ) ) : ?>
32
32
<ul class="sub-chapter">
33
33
<?php while ( $ sub_chapters ->have_posts () ) : $ sub_chapters ->the_post (); ?>
34
34
<?php if ( has_children ( $ post ) ) { ?>
35
- <li><a href="<?php the_permalink (); ?> ">
36
- <?php the_title (); ?>
37
- </a></li>
35
+ <?php $ is_active = ($ active_post ->ID == $ sub_chapters ->post ->ID ) || ($ active_post ->post_parent == $ sub_chapters ->post ->ID ); ?>
36
+ <li <?php if ($ is_active ) { echo "class='active' " ; } ?> >
37
+ <a href="<?php the_permalink (); ?> ">
38
+ <?php the_title (); ?>
39
+ </a>
40
+ </li>
38
41
<?php } ?>
39
42
<?php endwhile ; wp_reset_postdata (); ?>
40
43
</ul>
Original file line number Diff line number Diff line change 82
82
83
83
}
84
84
85
- # sidebar # chapter-listing li .active a {
85
+ # sidebar # chapter-listing li .active > a {
86
86
background : # 212121 ;
87
87
color : # fff ;
88
88
text-shadow : none;
89
89
}
90
90
91
- # sidebar # chapter-listing li .active a i . icon-tasks {
91
+ # sidebar # chapter-listing li .active > a i {
92
92
color : # fff ;
93
93
}
94
94
You can’t perform that action at this time.
0 commit comments