Title: [Plugin: Posts 2 Posts] Using connected post names to create post title
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Using connected post names to create post title

 *  Resolved [johnkoeller](https://wordpress.org/support/users/johnkoeller/)
 * (@johnkoeller)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-connected-post-names-to-create-post-title/)
 * Scribu, or anyone that might be able to help.
 * I’m struggling to figure out how to use the name of connected posts to update
   the title of the current post.
 * Details:
 * I currently have posts 2 posts connecting 2 custom post types — artists and events.
 * Each event allows the end user to create a new event and connect artists to it—
   this works great. I’d now like to remove the title support from the events post
   type, and automagically create a title on save that uses the connected artists
   names (and a custom field) as the post title for the event.
 * I’ve managed to figure out how to update the title with my custom fields, but
   I can’t figure out how to parse through the connected events and add them as 
   well.
 * Any help would be super appreciated.
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  [flashingcursor](https://wordpress.org/support/users/flashingcursor/)
 * (@flashingcursor)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-connected-post-names-to-create-post-title/#post-2097341)
 * John,
 * You should be able to do something like this:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * I’m sure there are several other filters or actions you could hook into rather
   than wp_insert_post_data — you’ll have to dig through the codex to figure out
   which one best suites your situation.
 *  Thread Starter [johnkoeller](https://wordpress.org/support/users/johnkoeller/)
 * (@johnkoeller)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-connected-post-names-to-create-post-title/#post-2097342)
 * Ah, I see. Ok – now that I’m starting to understand PHP a little better, this
   makes sense.
 * Thanks a ton!
 *  [CingKurtis](https://wordpress.org/support/users/cingkurtis/)
 * (@cingkurtis)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-connected-post-names-to-create-post-title/#post-2097462)
 * Would be very nice to see the removed solution for this.

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

The topic ‘[Plugin: Posts 2 Posts] Using connected post names to create post title’
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/)

 * 3 replies
 * 3 participants
 * Last reply from: [CingKurtis](https://wordpress.org/support/users/cingkurtis/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-connected-post-names-to-create-post-title/#post-2097462)
 * Status: resolved