Nest page ancestors in 3.4 R3
-
I have a list of pages with nesting and active states. This does not work at all in 3.4. The only difference is that I have upgraded to the latest release candidate.
<!-- TOP LEVEL IF STATEMENT--> <?php if (is_page(16) || in_array(16, $post->ancestors)) { ?> <h2>ABOUT</h2> <ul> <!-- SECOND LEVEL PAGE --> <?php if (is_page(18) || in_array(18, $post->ancestors)) { ?> <li class="openParent current"><a href="/corporate/about/what-we-do/">What we do</a> <ul> <!-- THIRD LEVEL PAGE ACTIVE STATE IF --> <li <?php if (is_page(2398)) {?>class="current" <?php } ?>><a href="/corporate/about/what-we-do/ticketing/">Ticketing</a></li> </ul> </li> <?php } else { ?> <li><a href="/corporate/about/what-we-do/">What we do</a></li> <?php } ?> </ul><?php } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Nest page ancestors in 3.4 R3’ is closed to new replies.