Title: [Plugin: Posts 2 Posts] Create custom admin box and custom field
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Create custom admin box and custom field

 *  Resolved [Marco Schmoecker](https://wordpress.org/support/users/marcosf/)
 * (@marcosf)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/)
 * Hi Scribu,
 * Thanks for this awesome plugin!
 * I want to add some new functionality to the admin box in the “New …” tab:
    When
   you create a new (connected) post or CPT via the (edit post page) admin box than:-
   > Show a 2nd text field to add a new custom field for that post/CPT (not for 
   the connection).
 * The current situation/flow is that you can create a new post/CPT but you have
   to switch over to the new post/CPT to e.g. add a custom field, etc.
 * Is there a way to do that via a filter/new template in some way, or do I need
   to create my own admin box to make that work? Thanks!
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851053)
 * The thing is that, besides modifying the metabox HTML, you also need to be able
   to hook into the AJAX handler to save the custom field.
 * There are currently no hooks for either.
 *  Thread Starter [Marco Schmoecker](https://wordpress.org/support/users/marcosf/)
 * (@marcosf)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851179)
 * So, basically I’d have to develop my own metabox and AJAX handler to accomplish
   saving a custom field with (newly created) connected post/CPT?
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851180)
 * Yes, you’d have to make your own metabox, but you don’t necessarily need to use
   AJAX with it.
 *  Thread Starter [Marco Schmoecker](https://wordpress.org/support/users/marcosf/)
 * (@marcosf)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851181)
 * Thanks!
 * Is there an example of a custom meta box around in combination with your plugin?
   Should I base my custom meta box on the one in your plugin, or would that create
   more work on my part vs. simply creating my own metabox.
 * And, should I use your plugins methods to save the connection data?
 * Cheers!
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851182)
 * See [https://github.com/scribu/wp-posts-to-posts/wiki/Custom-admin-boxes](https://github.com/scribu/wp-posts-to-posts/wiki/Custom-admin-boxes)
 *  Thread Starter [Marco Schmoecker](https://wordpress.org/support/users/marcosf/)
 * (@marcosf)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851183)
 * Ah, thanks! RTFM I guess 🙂

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

The topic ‘[Plugin: Posts 2 Posts] Create custom admin box and custom field’ 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/)

## Tags

 * [admin box](https://wordpress.org/support/topic-tag/admin-box/)
 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)

 * 6 replies
 * 2 participants
 * Last reply from: [Marco Schmoecker](https://wordpress.org/support/users/marcosf/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-create-custom-admin-box-and-custom-field/#post-2851183)
 * Status: resolved