How do i add fields to M:M relationship?

[ad_1]

I have ACF Pro, and am trying several page builders and such to see if i can find anything that will work for my needs of creating single post templates for all my models that can connect with ACF. I’m trying to avoid custom code unless it’s something really simple I can implement. I’m already “custom-coding” a lot of the site on Laravel, and if I’m going to spend time on custom code, it will be with that. I dont want to have to learn the inner workings of a brand new framework. The purpose of WordPress is to simply get something quick and temporary rolling while i figure out the remaining parts. But quick doesn’t seem to be an option.

I need to be able to create one template with a few sub templates of related data, then upload my data into my ACF fields and go from there. I’m not about to hand build all 950+ records I have for just one model x Many dozens for the related models

That said, I have many relationships I need to handle. Typically, on a normalized data base, there would be 3 tables to set up. Model 1- model2, and a pivot that connects the two. WordPress doesnt have this natively. So does anyone know how I could set up additional fields that would typically be added to the pivot table? Either through some combination of plugins or an alternative approach with ACF? For example, if a user is connected to a job, fields like role, wages, etc may be in the pivot.

[ad_2]
1 Comment
  1. Your example isn’t m:m though, it’s a 1:m – joined with a primary key (or in WordPress parlance: postid). To do that with ACF you simply create a “relationship” field.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer