Get parent posts by path. Currently, this method only supports getting parents of the ‘page’ post type. The goal of this function is to create a clear path back to home given what would normally be a “ghost” directory. If any page matches the given path, it’ll be added.
Runs through the various WordPress conditional tags to check the current page being viewed. Once a condition is met, a specific method is launched to add items to the $items array.