Get meta information from post parent

So I am in a single page and I want to get some meta information from a parent page. This code is inside my footer.php:

if (is_single()) {
    global $post;
    $parent = get_post_achestor ( $post-ID );
    $some_value = get_post_meta( $parent, 'some_metabox_param', true);
}

It's not working people, can you please have a look?

UPDATE: the parent page in question is template that has this loop

?php query_posts( 'post_type=postposts_per_page=5paged=1' ); 
if ( have_posts() ) : global $more; ?              
div class="items"
    ?php while ( have_posts() ) : the_post(); $more = 0; ?
         ?php get_template_part( 'content', get_post_format() ); ?
     ?php endwhile; ?
     /div
 ?php endif; ?    

Topic post-meta Wordpress

Category Web


The ID of the parent post is in $post->post_parent. When a post has no parent, that number is 0. So …

if ( is_singular() ) 
{
    global $post;
    if ( 0 !== (int) $post->post_parent )
    {
        $some_value = get_post_meta( $post->post_parent, 'some_metabox_param', true );
        if ( ! empty ( $some_value ) )
            echo $some_value;
    }
}

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.