Title: [Plugin: Posts 2 Posts] Using posts to posts with custom post types
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Using posts to posts with custom post types

 *  Resolved [Sarah](https://wordpress.org/support/users/sazzlemajazzle/)
 * (@sazzlemajazzle)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/)
 * Firstly, thank you. This plugin is really helpful!
 * I’m trying to use it to do something, but I’m not sure if what I’m trying to 
   do is possible. My set-up is this: I’ve got a custom post type for businesses,
   and another for events. I want to associate events with businesses, so that when
   on the page for a business, I can display related events.
 * So far I’ve followed your ‘basic usage’ and that’s all good, I can pull through
   the title of the event. However, I have custom fields for my custom post type
   of events – for example, event location. On my event pages I’m displaying these
   using (for the example of event location) <?php echo get_post_meta($post->ID,‘
   event-location’, true); ?> Is there a way that I can pull this information through
   and display it on the page for a business along with the event title?
 * Please let me know if you need any more info to answer my question.
 * Thanks again!
    Sarah
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485769)
 * You can display any information you want. It’s just a loop:
 * [https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage](https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage)
 *  [robheath](https://wordpress.org/support/users/robheath/)
 * (@robheath)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485816)
 * I used the following
 *     ```
       function my_connection_types() {
       	// Make sure the Posts 2 Posts plugin is active.
       	if ( !function_exists( 'p2p_register_connection_type' ) )
       		return;
   
       	p2p_register_connection_type( array(
       		'name' => 'Movie Trailer_to_Movie Hub',
       		'from' => 'Movie Trailer',
       		'to' => 'Movie Hub'
       	) );
       }
       add_action( 'wp_loaded', 'my_connection_types' );
       ```
   
 * But it stills show up as the following:
 * “Posts ↔ Posts (Connected Posts)”
 * The box doesn’t appear in my custom post type editor pages. But still shows up
   in the default post type editor. What am I doing wrong?
 * My post types exist, I registered them in the functions file.
 * Thanks for your help.
 *  [robheath](https://wordpress.org/support/users/robheath/)
 * (@robheath)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485817)
 * I also tried using “movie_trailer” and “movie_hub”
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485818)
 * [@robheath](https://wordpress.org/support/users/robheath/): Hijacking a thread
   like that is impolite. Please open a new one.
 *  [robheath](https://wordpress.org/support/users/robheath/)
 * (@robheath)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485819)
 * [http://wordpress.org/support/topic/plugin-posts-2-posts-custom-post-type-issue?replies=1](http://wordpress.org/support/topic/plugin-posts-2-posts-custom-post-type-issue?replies=1)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Posts 2 Posts] Using posts to posts with custom post types’ 
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [robheath](https://wordpress.org/support/users/robheath/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-posts-to-posts-with-custom-post-types/#post-2485819)
 * Status: resolved