Title: [Plugin: Posts 2 Posts] No posts available in meta box
Last modified: August 19, 2016

---

# [Plugin: Posts 2 Posts] No posts available in meta box

 *  Resolved [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/)
 * Probably a really silly oversight but I have installed the Posts 2 Posts plugin
   and cannot select posts to create the relationships.
 * I have the following code in my functions.php:
 *     ```
       if ( function_exists('p2p_register_connection_type') ) {
               function my_connection_types() {
                       p2p_register_connection_type('dataset', 'data', true);
               }
               add_action('init', 'my_connection_types', 100);
       }
       ```
   
 * The meta box to select connected posts shows on the edit screen of each type 
   but when I enter the name of a post, nothing ever appears that I can select. 
   I have tried creating new posts of each type and reinstalling the plugin. Please
   let me know what I am missing to get this working.
 * This looks like a great plugin and I’m looking forward to digging in with it.
   Thanks!

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/page/2/?output_format=md)

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615516)
 * Can you paste the code you use to register the post types?
 *  Thread Starter [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615607)
 * Thanks for taking a look at this!
 *     ```
       function ds_posttypes() {
       	register_post_type( 'data',
       		array(
       			'label' => __('data'),
       			'singular_label' => __('data'),
       			'public' => true,
                               'menu_position' => 5,
       			'supports' => array( 'title', 'editor', 'excerpt' ),
       			'capability_type' => 'post',
       			'rewrite' => array('slug' => 'data'),
       			'query_var' => 'data',
       		)
       	);
               register_post_type( 'dataset',
       		array(
       			'label' => __('datasets'),
       			'singular_label' => __('dataset'),
       			'public' => true,
                               	'menu_position' => 6,
       	                        'hierarchical' => true,
       			'supports' => array( 'title', 'editor', 'excerpt', 'page-attributes' ),
       			'capability_type' => 'post',
       			'rewrite' => array('slug' => 'dataset'),
       			'query_var' => 'dataset',
       		)
       	);
       }
   
       add_action( 'init', 'ds_posttypes' );
       ```
   
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615650)
 * It’s working fine on my test install.
 * Please install [Firebug](http://getfirebug.com/) and [check the ajax response](http://www.dev4press.com/2010/tutorials/general-tutorials/use-firebug-to-track-ajax-requests-and-responses/)
   when looking for posts to connect to.
 *  Thread Starter [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615666)
 * Hi Scribu –
 * Thanks for your help with this. I realized I accidentally sent you the wrong 
   code for the post types I registered where I am having this issue. The post types
   I am registering are identical to the code I sent previously, but have an “hs_”
   prefix in the first parameter, ie:
 * `register_post_type( 'hs_dataset...'`
 * When I looked at the ajax response, it appears that the underscore and everything
   after it is not being sent. Here are the parameters that are being sent in the
   GET, copied directly from Firebug:
 * > action p2p_search
   >  post_type hs q test
 * Please let me know what you think. Thanks again.
 *  Thread Starter [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615667)
 * To try to verify the issue, I copied the URL from the GET request and appended
   on the rest of the correct pot type name including the underscore. The response
   looked like the list of posts of that type I would expect to be returned.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615669)
 * I can reproduce it now. Should be fixed in the [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip)(
   0.4-alpha2).
 *  Thread Starter [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615682)
 * Looks like it’s working now. Thanks for your attention and the quick fix! Much
   appreciated.
 * One question… Since the relationship is bidirectional, I thought that once I 
   selected a connection on one side, it would be displayed on the other as well
   but that was not the case. Should it be or did I miss something?
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615695)
 * Yes, it should be and it’s working on my end.
 *  Thread Starter [conradh](https://wordpress.org/support/users/conradh/)
 * (@conradh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615707)
 * Looks like it’s working fine on newly created relationships. Thanks for the help,
   and the plugin!
 *  [Cristiano](https://wordpress.org/support/users/iclapton/)
 * (@iclapton)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615874)
 * I´m using the 0.4-beta version.
    I have the following code on my functions.php:
 *     ```
       function my_connection_types() {
       	if ( !function_exists('p2p_register_connection_type') )
       		return;
   
       	p2p_register_connection_type( 'texto', 'materia' );
       }
       add_action('init', 'my_connection_types', 100);
       ```
   
 * The connection field appears on my “texto” post type… I can select a “materia”
   to connect to, but when I save the changes, the connection disappears… and it
   says “no connection”.
 * What is wrong?
    thanks!
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615878)
 * Did you re-activate the plugin after updating to 0.4-beta ?
 *  [Cristiano](https://wordpress.org/support/users/iclapton/)
 * (@iclapton)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615879)
 * It was activated and didn´t work… now, I deactivated it and activated it again,
   and it´s ok! 🙂
 *  [qwik3r](https://wordpress.org/support/users/qwik3r/)
 * (@qwik3r)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615880)
 * I’m not sure where I can grab the 0.4-beta but your .03 version does not save
   the connection as stated above, I am experiencing the same problem
 *  [ronbme](https://wordpress.org/support/users/ronbme/)
 * (@ronbme)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615882)
 * qwik3r,
 * You can click on the link “development version” above in scribu’s comment, or
   you can go to the plugin page and click on “Other versions”.
    Then click on “
   Development version” to download it.
 *  [qwik3r](https://wordpress.org/support/users/qwik3r/)
 * (@qwik3r)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/#post-1615883)
 * Yep that is what I did and it appears to be working. He should really update 
   the production version since its basically useless.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/page/2/?output_format=md)

The topic ‘[Plugin: Posts 2 Posts] No posts available in meta box’ 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/)

 * 21 replies
 * 5 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-no-posts-available-in-meta-box/page/2/#post-1615890)
 * Status: resolved