Support

Account

Forum Replies Created

  • @pierrebalian this is awesome and works wonderfully except for one thing: when you attempt to add a new post of the specified custom post type the browser attempts to download a .vcf file. No file name, as I assume it’s trying to download a file with “post_name.vcf” but there’s not post_name to reference so it’s just “.vcf”.

    Did you or @pixelsandthings figure out a workaround for this glitch?

    Thanks!

  • I totally understand. The rabbit hole can get deep, quickly. In my use case the fields are on the top level and not buried within flexible content or repeaters.

    So the only thing I need to use in my case would be the example code, right?

  • So it looks like the add on only works if the field is the same name on each post whereas the acf-reciprocal-relationship.php code you shared seems to allow for two different fields on two different post types. Am I seeing/reading this correctly?

    Either way, wow. You’ve done some fantastic coding there sir.

  • Ok, I’d like to re-open this as it wasn’t solved and I’m trying to do the same thing only I really need to keep it in the ACF Pro family. I have a couple Volleyball clubs that have to update their teams and players each season. Here’s the current setup:
    Team CPT (team)
    Field

    • Players (players): Relationship field, can select multiple posts, limited to only the “player” CPT.

    Player CPT (player)
    Field

    • Team (team): Relationship field, required, can select only one post, limited to only the “team” CPT.

    I’d like to setup the bidirectional relationship to allow a player CPT to select a team CPT from it’s “team” relationship field and that team CPT then have it’s “player” relationship field updated with the new player CPT. And vice versa. I have the ability to import the massive list of players to assign to the 30+ teams but without the bidirectional option this won’t really work. From a management standpoint it’s much easier to edit a team’s list of players from the team CPT edit page. However, the CSV import allows to mass update or add players and thereby the teams they are assigned to.

    Is this possible with ACF Pro? If so, I’d be happy to write up a nice article detailing all of the setup I’ve gone through with these relationships as I’m sure others have tried to accomplish similar functionality albeit different CPT and field names. Those of course have been changed to protect the innocent. 🙂

  • So it looks like the OP figured it out over at: https://wordpress.org/support/topic/adding-a-custom-field-in-addition-to-post-name-to-permalinks?replies=22

    However, I have a similar situation. If I should open a completely new thread then please let me know but I’d like to use an ACF Pro Relationship field to prepend to my CPT. Here’s my situation:

    I have a CPT “Team” with a relationship field that allows you to select multiple values for the CPT “Player”. The URL structure of the “Team” CPTs looks like “/teams/darkside/12-darkside” for the team named “12 Darkside” and the category “Darkside”. I currently am using code that I posted over at wordpress.org.
    The code updates the permalink of the “Team” to use the structure “/teams/[team-category]/[team-name]”.

    So…is there a way to use either Bidirectional Relationship code or just use the Relationship field on the “Team” CPT to prepend “/teams/darkside/12-darkside/” before the “Player” CPT’s permalink? The end result would look like “/teams/darkside/12-darkside/[player-name]”.

    Sources:

  • @huwrowlands I’m not sure what addon you’re referring to as I’ve not created anything. I was only laying out what I thought should be the setup/functionality for ACF Pro.

  • So is there not an update to ACF PRO 5 to allow us to output individually the following:

    • [street_address]
    • [city]
    • [state]
    • [zip]
    • [country]

    I figured since it’s been a year and ACF PRO was released that this would be taken care of. The geo lat and long are recorded but the items need to be mapped and saved separately to be able to call it. The numbering doesn’t work properly as sometimes a ZIP isn’t saved or queried.

    Any update from the ACF team? Thanks!

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