Title: cannot hide admin box with &#039;show&#039; =&gt; &#039;from&#039;
Last modified: August 21, 2016

---

# cannot hide admin box with 'show' => 'from'

 *  Resolved [rigagoogoo](https://wordpress.org/support/users/rigagoogoo/)
 * (@rigagoogoo)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/)
 * hi,
 * great plugin, really enjoying using it. however I’ve found ‘show’ => ‘from’ does
   not work as expected. if I create the following connection the to admin box still
   shows up on all of the CPT’s. It’s not the end of the world it would just help
   save confusion to be able to remove the admin box….
 *     ```
       p2p_register_connection_type(
          array(
                    'name' => 'stuff_to_stuff',
                    'from' => array('holidays' , 'courses' , 'accommodation',
                                    'gear','companies','experiences'),
                      'to' => array('holidays' , 'courses' , 'accommodation' ,
                                    'gear' , 'companies' , 'experiences'),
                   'title' => array('to'   => 'test',
                                    'from' => 'products that are related'),
          'admin_dropdown' => 'any',
          'show'           => 'from'
          )
       );
       ```
   
 * cheers
    rigagoogoo
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  [Paul123456](https://wordpress.org/support/users/paul123456/)
 * (@paul123456)
 * [13 years ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/#post-3681101)
 * Just to say I encountered the same problem (3.5.1)
 * Additionally,
    ‘show’ => ‘false’, ‘context’ => ‘advanced’ … also have no visible
   either on my setup.
 * I guess the quickfix is to set the css to display:none
    The id used to identify
   the admin box is unique depending on what posttype you are editing. So easy! #
   p2p-to-Session_to_Abstract #p2p-from-Session_to_Abstract
 * This filter works but removes all admin boxes which isnt quite what I want.
    
   e.g. function restrict_p2p_box_display( $show, $ctype, $post ) { if ( ‘ConnectionName’
   == $ctype->name && ‘to’ == $ctype->get_direction() ) { return 1; }
 *  return 0;
    }
 * [https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-filters](https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-filters)
 * Great Plugin. Just recoded a weeks work having found this gem!
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/#post-3681104)
 * It doesn’t work because that’s not the correct syntax.
 * Read the wiki page again: [https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-display](https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-display)
 *  [Paul123456](https://wordpress.org/support/users/paul123456/)
 * (@paul123456)
 * [13 years ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/#post-3681108)
 * Thanks for the reply. Sorry for missing the obvious !
 *  Thread Starter [rigagoogoo](https://wordpress.org/support/users/rigagoogoo/)
 * (@rigagoogoo)
 * [13 years ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/#post-3681114)
 * ditto, my bad… must have been having a moment of blindness for the nested arrays,
   thank you for replying 🙂

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

The topic ‘cannot hide admin box with 'show' => 'from'’ 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [rigagoogoo](https://wordpress.org/support/users/rigagoogoo/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/cannot-hide-admin-box-with-show-from/#post-3681114)
 * Status: resolved