Home Forums Backend Issues (wp-admin) how to save/edit the database from a relationship of a taxonomy inside the post


how to save/edit the database from a relationship of a taxonomy inside the post

  • Hi,

    i’m with a big problem here 🙁
    I’ve a project of a product’s catalog with a filtering system and this filter works with 3 taxonomies (type, brand, location), and a relationship between them. With ACF i’d created a connection through “type” and “brand”, and another through “brand” and “location”, now i’m changing those filters to create a connection between everything. But the real problem is, to create every relationship now I need to edit the taxonomy item. But this isn’t intuitive because i’m choose the taxonomy when I create the product and after i need to connect them… But now I need to do this from the product page not from the taxonomy item. Is this possible?

    I’m trying to create a code that will work similar to this:

    I choose a Type, and after a brand and a location. And the system will change the database of those taxonomies with the acf field to include the IDs of the taxonomies and create a connection between them. I’m clear?

  • What you’re looking to do is going to be complicated, but maybe I can help point you in the right direction.

    As I understand it you’re currently keeping track of relationships between posts and terms in the terms. This would be better done with a taxonomy field in the post, which I think is the direction your heading in.

    But you want to update the relationship fields in the terms as well, that’s the complicated part.

    You’re going to need to create an acf/upate_value filter for each taxonomy field and then update the fields on the term pages based on the taxonomy field

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

You must be logged in to reply to this topic.