# Pinegrow and advanced ACF usage

**URL:** <https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010>\
**Category:** WordPress\
**Tags:** acf\
**Created:** [December 9, 2021, 12:28pm UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010 "2021-12-09T12:28:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tazintosh](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Tazintosh](https://forum.pinegrow.com/u/Tazintosh)\
**Post date:** [December 9, 2021, 12:28pm UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/1 "2021-12-09T12:28:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Tazintosh](https://forum.pinegrow.com/u/Tazintosh)\
**Post date:** [December 15, 2021, 11:38am UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/2 "2021-12-15T11:38:35Z")

</div>

May I try a kind bump?

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [December 20, 2021, 10:33am UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/3 "2021-12-20T10:33:21Z")

</div>

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](https://pinegrow.com/docs/wordpress/creating-custom-wordpress-blocks/creating-acf-pro-blocks/)? 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?  
Cheers,  
Bob

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Tazintosh](https://forum.pinegrow.com/u/Tazintosh)\
**Post date:** [December 20, 2021, 11:02am UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/4 "2021-12-20T11:02:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [December 20, 2021, 11:45am UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/5 "2021-12-20T11:45:30Z")

</div>

@Tazintosh

Everything is possible from Pinegrow 🙂 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.

> **[How\_to\_use\_ACF\_Pro\_Flexible\_Content\_with\_Pinegrow\_WP.pdf](https://www.dropbox.com/s/tk3i4sbygpc0rgr/How_to_use_ACF_Pro_Flexible_Content_with_Pinegrow_WP.pdf?dl=0)**

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@Tazintosh](https://forum.pinegrow.com/u/Tazintosh)\
**Post date:** [December 20, 2021, 12:46pm UTC](https://forum.pinegrow.com/t/pinegrow-and-advanced-acf-usage/6010/6 "2021-12-20T12:46:17Z")

</div>

Very interesting piece of tutorial.  
Gives nice perspectives.  
Thanks.
