P2P archive loop
-
Hi Scribu, I’m trying to make a loop that runs through one of my custom post types (called “RFAs”) and displays a field from a connected CPT (called “Companies”). I also need to exclude certain RFAs from the loop (hence the meta query).
Here’s my loop, which gives me the white screen of death (I’m sure there are many things wrong with this):
function ticker_list() { query_posts( array( 'post_type' => array( 'rfa' ), 'connected_type' => 'companies_to_rfas', 'connected_items' => get_queried_object(), 'showposts' => '45', 'meta_key' => 'wpcf-exclude', 'meta_value' => array('1','2'), 'meta_compare' => 'NOT IN' ) ); while(have_posts()) : the_post(); echo(types_render_field("ticker")); endwhile; }
[Please post code between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Thanks in advance for your help!
– Frank
- The topic ‘P2P archive loop’ is closed to new replies.