Get parent name from post->ID and display list of child pages from that.


/ Published in: PHP
Save to your folder(s)

Use getTopParentPostName() to get the parent slug. Then use get_ID_by_slug() to get the ID of it. The use wp_list_pages() to display the child pages :)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.