So I’m in a single web page and I need to get some meta data from a guardian web page. This code is inside my footer.php:
if (is_single()) {
international $publish;
$guardian = get_post_achestor ( $post->ID );
$some_value = get_post_meta( $guardian, 'some_metabox_param', true);
}
It isn’t working folks, are you able to please take a look?
UPDATE: the guardian web page in query is template that has this loop
<?php query_posts( 'post_type=publish&posts_per_page=5&paged=1' );
if ( have_posts() ) : international $extra; ?>
<div class="gadgets">
<?php whereas ( have_posts() ) : the_post(); $extra = 0; ?>
<?php get_template_part( 'content material', get_post_format() ); ?>
<?php endwhile; ?>
</div>
<?php endif; ?>