Show Grandchild Subpages

A recently developed navigation scheme called for a horizontal menu with a dropline for the second level pages and a third level page list in the sidebar. Although there are lots of sidebar widgets for subpages, it took a bit of digging and cobbling together of information from different sources to implement this hybrid scheme.

The first step was to add a function to identify the grandchildren.  The easiest way to do this turned out to be via a plugin: WP Extra Template Tags.  This very handy collection of additional functions includes _is_grandchild() which was exactly what I needed.

Here’s the code: