I am trying to get the value of a custom field inside an iframe.
I am passing the id of the post in the URL that opens the frame and I am catching that value with
The problem is I am unable to get the custom value specific for the page ID, infact I am not getting any values.
<?php global $post; $post->ID = query_posts('p='.$_GET['pid']); $the_id = $post->ID ?><?php get_post_meta($the_id, 'email'); ?>
And it gives me an “Illegal offset type” error in wp-includes/cache.php
<?php query_posts('p='.$_GET['pid']); ?><?php get_post_custom_values('email', $post_id); ?><?php wp_reset_query(); ?>
And it returns nothing. How do I do it?
- The topic ‘Custom Value in iframe’ is closed to new replies.