[resolved] Custom Value in iframe (2 posts)

  1. mariostella
    Posted 5 years ago #

    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.

    I tried

    <?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

    Also tried
    <?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?

  2. mariostella
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic