[Plugin: Posts 2 Posts] Returning the Connection Information Value
-
Hi Scribu,
Now I’m trying to get the arbitrary value that I insert in the connection information array from outside the loop. I have looked at Twansparant question and looked at the github code but the answer escapes me.
My code is for functions.php:$my_connection_type = p2p_register_connection_type( array( 'from' => 'product', 'to' => 'client', 'fields' => array( 'product_link' => 'link' ) ) );
and in the page:
<?php $wp_query = new WP_Query(array( 'post_type' => 'client', 'client_type' => 'Distributor')); echo '<h2>' . _e('Where to buy', 'eq_power') . '</h2>'; while ($wp_query->have_posts() ) : $wp_query->the_post(); echo p2p_get_meta($post->p2p_id, 'product_link', true); endwhile; wp_reset_postdata(); ?>
thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin: Posts 2 Posts] Returning the Connection Information Value’ is closed to new replies.