Revisiting Pods and Beaver Themer; Conditional Field Connections

Beaver Themer & Pods - Limitations

Revisiting Pods and Beaver Themer; Conditional Field Connections

At the last WordCamp Kent, I gave a presentation about building darn-near any kind of website using Pods and Beaver Themer. Someone had asked why I preferred Pods for custom post types and custom fields to ACF & CPT. I didn’t have much of a preference back then, except for the benefit of managing everything within one plugin rather than 2.

I have come to find one vital limitation with Pods and Themer though – testing conditionals for values. With Pods and Themer, you can only do all-or-nothing conditional field connections in a shortcode; “if there is something in this field, then display this”.

[wpbb-if post:pods_display field='field_name']
<ul>
<li>If there's something/anything in that field (field_name), this content will show.</li>
<li>If it's blank, this list will not appear.</li>
</ul>
[/wpbb-if]

This is valuable when you don’t want a blank space to appear. However, if you need it to be value-based, Beaver Themer can only help you if you’re using ACF. I’ve come across a few instances where I need content to change based on a toggle or radio button; relying on a “yes/no” rather than a yes/null.

There is a lot you can do with conditionals, especially if the field is numbers rather than text. I haven’t come across a scenario yet where I needed the content to change if the field value was less-than or equal to, say 100, but here’s an example from a site I built, partakekitchen.com:

[wpbb-if post:acf type='radio' name='vegetarian']
  <div class="mp-label">Vegetarian</div>
    <img src="/wp-content/uploads/2019/03/vegetarian-icon.png" alt="Vegetarian">
[/wpbb-if]

screen shot of conditional shortcode displaying an icon if a box is checked

In this example, if the menu item is labeled Vegetarian, the little vegetarian icon appears.

I felt like I had to do excessive digging to find out that I couldn’t do this with Pods. Any time I have to dig, I have to write about it! So let it be known, value expressions, like those discussed in this Beaver Themer knowledge base article, cannot be performed with Pods custom fields. Only with ACF or Toolset (though I have no firsthand experience with Toolset).

There is, however, a wealth of information in the Beaver Builder KB on using ACF. So much so that they put together a collection of ACF-related field connection KB articles. Then there’s the one little “Build This” article on using Pods and Beaver Themer.

This is not to say that it can’t be done! I know there’s a lot you can do with Pods templates, though I haven’t had any luck using them in Themer. There’s also a thing called Meta Box which has been paired with Pods, but I couldn’t find anything easily digestible on it.

There is a lot of information on the Pods website, but most of it seems to require a lot of advanced WordPress development knowledge. I can handle a little PHP customization, plug-in creation, but I don’t have a good enough grasp on it to freestyle write PHP. That’s why I use a plugin for my custom post types in the first place!

Photo of Abby Lehman Buzon, owner of The Helpful Marketer

About the Author

Abby Buzon

I'm Abby (Armstrong-Lehman) Buzon, Lead Designer & Owner of The Helpful Marketer, based in Medina County, Ohio. I got my start in marketing and website administration in 2010, became a mom in 2015, and left my day job in 2017 to begin The Helpful Marketer. I'm happier than I've ever been and I truly love what I do, so I'm here to share my story and give some marketing tips along the way!

 

3 Comments

  1. Hannu Jaatinen on December 19, 2019 at 4:58 am

    Can’t you use the Conditional Logic for this on the Advanced tab?
    It should work if the icon is in its own module but it probably won’t work if you want to embed the icon in the middle of a, let’s say, Text Editor module

    • Abby Buzon on December 19, 2019 at 7:54 pm

      Thanks for commenting Hannu! I’ll have to look into that more. I have yet to find an instance where the Conditional Logic in the Advanced tab was actually something I could use, but perhaps I haven’t explored all the possibilities of it yet.

  2. Abby Buzon on January 28, 2020 at 10:09 am

    Since Hannu’s comment, I’ve still been looking for opportunities to use the BB modules’ Conditional Logic and have found a few, but still none related to conditional values in a CPT or Pod. The instances where I’ve need a value-based conditional were all within text, namely within a the Custom Layout HTML of a Post module. Post modules themselves end up being 99% of my work with custom post types.
    I suppose you could have the entire Post Module controlled by the conditional Logic and have multiple variations of the Post Module for each of the different conditions though… I love the possibilities for this!
    If anyone has any examples of sites they’ve built using Pods or CPT’s with Conditional Logic or Value Expressions, I’d love to see them – please share a link in the comments!

Leave a Comment