/ Published in: PHP
This is a really short function you can use inside The Loop to get the parent page slug (useful to add to the body classes or something)
Expand |
Embed | Plain Text
function get_parent_slug(){ $parent = get_page($post->post_parent); return $parent->post_name; }
You need to login to post a comment.
