Since it builds on top of shortcodes it is very easy to extend.
I have not tried to embed ACF fields in the Visual Composer block settings modal dialogue. I thought about it a long time ago but came to the conclusion that it doesn’t make a lot of sense in that context.
What I do is use ACF for fields that are related to the post being edited, and Visual Composer fields to the shortcode being edited. The data is very different. ACF fields are post attributes, while VC block fields are presentational data related to that specific shortcode and how it should be presented.
Layouts is very good, but is slightly different to VC. Currently I use it to build ‘global’ elements (headers, footers, sidebar), but the layouts are held elsewhere – rather than at the page level.
You assign the layout like a WordPress template, but do the editing of the layout within the Layouts plugin – so it’s a bit clunky from a user’s perspective: having to be in 2 places to edit 1 page – hence why I only use it for the global elements. But this is very powerful, as I can build any number of variations of these, and then hand it to a client for them to easily choose.
For the page level stuff, I’ve been using ACF: Flexible content, which is really really nice, but for a client – it’s just not intuitive enough – and to build even half of the features that VC currently offers would take me months!
Your logic makes sense regarding ACF for page attributes + VC for data – however, it does raise one question: How do you query this data from elsewhere?
As a not-quite-real-life example: If I have a CPT with a title, subtitle & content – the title and content are WP default fields, but the subtitle I would use a custom field.
If I wanted to loop through my items inside the CPT, and output the subtitle – once I was in the loop, I could simply do
to output the subtitle. How would you approach this sort of thing with VC? Could you store the custom field data in the post, and then output using VC?
I want to thank you for taking the time to explain this at WordCamp Norrköping and for posting it here, it helps a lot understanding the workflow and correct it if necessary. Your post is useful and it show a clean working method.
For this, my hat’s off to you and thank you a lot !