WordPress.org

Ready to get started?Download WordPress

Forums

How can i get the parent slug? (2 posts)

  1. forgetcolor
    Member
    Posted 7 years ago #

    I'd like to get the parent's slug name. I guess I need something like get_the_title($post->post_parent), except instead of the title I want the slug. get_the_slug($post->post_parent) would be the obvious choice but it doesn't exist.

    ideas? thanks!

  2. forgetcolor
    Member
    Posted 7 years ago #

    Ok, never mind. I found a solution. Check out is_child()!

    http://erik.range-it.de/wordpress/plugins/is_child/

    This does precisely what I was looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.