Function to Check if Page has Parent

Works in relationship with has_children();

function has_parent() {
    global $post;

    if( $post->post_parent != 0 ) {
       return true;
    } else {
        return false;

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.