Support

Account

Home Forums Backend Issues (wp-admin) Two way relationship?

Solved

Two way relationship?

  • I was wondering if there is a way to use relationship two way?

    Let’s say I have a hierarchical custom post type, that has a relationship field filled with custom post type posts.

    When I edit the custom post type, I would like to see what pages it is related to. Is that possible already or is that function in the future?

    Many thanks for an incredibly useful plugin.

  • Thanks! That will help me a bit!

    I forgot to mention that I wanted it in Admin, not front-end.

    As for now, I’m trying to work with the load-field hook.
    On the edit-post screen, I’m trying to load all pages that have relationship fields, and mark the ones where the current post is related.

    Now, the relationship is determined from the page. As in the page has the relationship field and adds posts to it.

    I wanted a relationship field on the post to show what pages it is attached to but it seems like it is making a new relationship of its own.

    Does that make it more clear? =)

  • Sorry. Maybe that wasn’t clear at all.

    I have pages with a relationship field to add posts.

    But when I edit a post, I want to see a list of pages, and mark the ones where the post is related + the abillity to add/remove the relation.

  • Hi @studiogulo

    I think you should take a look at the posts 2 posts plugin.
    That will give the 2 way relationship UI that you seek!

    Basically, the relationship field won’t show the connected posts in the way you have described

    Good luck

    Thanks
    E

  • Thank you, I’ll have a look at that!

  • That plugin really did the trick!

    Too bad ACF relationship didn’t work out, I really would have liked to stick to only ACF 😉

  • I would really love to see this in the ACF relationships field as well. I’m sure it’s a lot more technically complicated than it sounds, but it would be amazing.

  • I’d like to add a vote for this. I have a site that uses ACF and Posts2Posts… there are vendors, products and reviews and P2P has helped a lot in being able to say “this vendor is connected to these products and these products connect to these reviews.”

    However.. scribu is no longer developing or supporting Posts2posts. Sure, it works. He’ll probably fix any big breaking things… but it’s officially unsupported.

    Even more than that, though, it’s that I’d like to be able to combined this with the repeater field so it’s very easy and quick to update a bunch of entries. This would make data management much easier.

  • Hi guys

    Thanks for your support on this one, but in short, there is a reason why ‘posts 2 posts’ in an entire plugin.

    This is a very complicated feature and requires lots of code and DB information which ACF does not support.

    Thanks again, but I don’t want to lead anyone one thinking that this will make it into the core any time soon.

    Thanks
    E

  • Elliot – completely understand. I’m in theory concerned about what to do when Posts2posts breaks, but I’ll worry about that when and if it happens.

  • I would love to see this integrated as well! I have been using Posts 2 Posts plugin for a very long time now on dozens of projects and it’s absolutely one of the best WordPress plugins hands down!

    However I try to avoid using a lot of different WP metaboxes in the WP admin area for my clients. The Posts 2 Posts adds a metabox for every connection, it would be so cool to be able to add these boxes in the ACF interface with the other custom fields. Could this be possible somehow?

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Two way relationship?’ is closed to new replies.