View connections in template
-
Hi Guys,
Is it possible to list the connections on another template (not a single or archive page)? For example I have a Contact page and in this page I want to list Staff that work in an office.
My connection isp2p_register_connection_type(array( 'name' => 'staff_to_office', 'from' => 'staff', 'to' => 'office' ));
In mysql what I’d like to achieve will look like this
SELECT * FROM staff WHERE office_id = 123
I would like to pull out all the information in this manner using WP_Query (on the same page)
London
——
John Smith
Steve JonesNew York
——–
John Doe
Jane DoneParis
—–
John Doe
Steve JonesAny help will be greatly appreciated
Thanks
- The topic ‘View connections in template’ is closed to new replies.