Posts 2 Posts – Create Connection

add_action( 'init', 'be_post_type_connections' );
* Post Type Connection
* @author Bill Erickson
* @link
* @uses Posts2Posts
* @link
function be_post_type_connections() {
// Make Sure plugin is active
if ( !function_exists( 'p2p_register_connection_type' ) )
p2p_register_connection_type( array(
'name' => 'sessions_to_speakers', // unique name
'from' => 'sc-sessions', // post type slug
'to' => 'sc-speakers' // post type slug
) );
view raw hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk