Pinegrow and advanced ACF usage

Hi everyone,

I’m actually testing Pinegrow to see if I could provide another kind of service to my clients.
I’m generally developing 100% custom Wordpress themes (unique per client, no framework, all by hand).
Using a lot ACF to provide my clients with an admin UI, I then write the full PHP code to “render”.
I’ve successfully made a test page where I display a basic image field (from ACF) inside an article.

Here’s a very basic question:
Lets say my client also have a true/false ACF checkbox so he can decide to display the image or not. There are infinite reasons a client ACF setting could trigger a different code generation, like a dropdown to change a page layout, etc. If dropdown = “unavailable”, then set “red” class, etc.

How do handle those “conditional” cases in Pinegrow? I’ve not found anything about an “advanced” usage, only basic get_field thingy.

Thanks in advance for your time

May I try a kind bump?

1 Like

Hi @Tazintosh,
Sorry for the extreme delay. ACF isn’t my strong suit, so I haven’t dove into this question, yet. From the WordPress actions, Pinegrow only offers the get_field() function. Anything else has to be done within a custom PHP action. There is some additional customization that can be done with blocks. I’m not sure if you have seen this documentation? I know that when you are adding a smart post field into a block there is the possibility of adding some logic statements. Maybe that would solve your use case?

Thanks for the answer @RobM.
Well, the IF statement is sadly quite insufficient here.
If I then my code in a custom.php file for instance, I guess I should not use at all the ACF get_field() thingy but directly include my function call in place?


Everything is possible from Pinegrow :slight_smile: sometimes it takes a little trickery!
Back when smart actions didn’t exist in Pinegrow, nor did ACF support, I posted this documentation that presented a way to do some complicated things “by hand”.

Even if the goal is different, it will certainly serve as an inspiration.


Very interesting piece of tutorial.
Gives nice perspectives.

1 Like