First or Last Page in Page-Structures of WordPress
Now and then little snippets are pretty useful. For a fix in a Premium-Theme, I needed a kind of evaluation, where I am in the site structure and with little effort I was able to expand the classes and react with CSS.
The following code shows the basic for it and get_pages()
is the key from the core of WordPress to get to these results. This function provides the necessary result of using the parameter and the output via the parameter sort_order
provides the sequence and identification of the first page, which is then either the first or last page in this structure.
Continue reading …