Very confused about some of this, to be honest. But I appreciate your help, John.
I guess I still have some things to learn about ACF – my use has been quite narrow so far.
FWIW, my current use case is roughly the one we discussed in another thread … trying to create a system to make it easy for me to assemble pages from re-usable components.
In that thread, I guess I started with a specific question/intention about a system that knows all Bootstrap 4 mark-up and would allow me to create, drag and drop new components in the moment, as it were.
As I begin to think about it and Google around, I began to think that this, if it were not already available, may be overkill… that perhaps I could accomplish the same effect with just the Flexible Content add-on.
The reason being, I don’t envisage my current set of pages diverging in design too much or me needing to add new and different Bootstrap 4 components directly on to the page. My small set of pages has a big degree of commonality.
I am thinking perhaps I can just create a number of Flexible Content fields with my mark-up stored against them, then write write out the dynamic field content inside my mark-up, with possibly a few simple options and the ability to drag these “blocks” around.
I am presuming the mark-up then would be stored inside the page.php itself. I will look at writing out specific CSS class selectors depending on radio button selected, for example.
That’s what I’m currently testing.
I think this is the basic intended function of the Flexible Content add-on, yes?
So far, I love the result. Though I am early in.
I envisage needing to learn how to nest conditional statements in the output code, ie. if we are using a homepage (tall) jumbotron, then write out one CSS class, but if we are using a standard landing page jumbotron (shorter), write out the alternative CSS class.
Also, given that I’m using Bootstrap, I will also need to shed my confusion about the word “rows” 😉
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.