Display parent and other child pages while on a 2nd level page or a 3rd level page

Parent

-2nd level

–3rd level

-2nd level

–3rd level

etc.

Had a challenge to list child pages of a parent,after that if I’m on a 2nd level page show it’s siblings and (if they have) their child pages and if I’m on a 3rd level page show it’s parent and parent’s siblings.
After searching couldn’t find anything related to this.
So after finishing the task thought I’d share it(answer my own question) so if anyone having this problem can find a solution since seeing there are not that much resources regarding this topic(searched,couldn’t find much helpful articles).

Read more here:: Display parent and other child pages while on a 2nd level page or a 3rd level page

Leave a Reply

Your email address will not be published. Required fields are marked *