Skip Navigation

[Resolved] logic not empty still shows field

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by Marisa 5 years, 7 months ago.

Author
Posts
#368211
  [wpv-conditional if="( NOT(empty($([wpv-post-excerpt]))) )"]
          <div class="excerpt">
            <h4 class="white" style="margin-top:0; margin-bottom:0; padding-bottom:0;">[wpv-post-excerpt length="20"]<h4>
              </div>
    [/wpv-conditional]

See how it returns only the empty fields in the screen shots? It's backwards of what I'm asking it to do. If I try to reverse it, they all disappear.

screenshot:
hidden link

I feel like this code is very simple, so if you can point out the error of it, maybe that will help me.

If not, I can clone the site to a staging version (right now it is local), and share logins and urls with you.

But if you see a problem with my code let me know.

#368224

I removed the brackets.

I also created a custom fields to use instead of the default excerpt, with which it just didn't work.

So new code is:

 [wpv-conditional if="( NOT(empty($(sticker))) )"]
          <div class="excerpt">
            <h4 class="white" style="margin-top:0; margin-bottom:0; padding-bottom:0;">[wpv-post-field name="sticker"]<h4>
              </div>
             [/wpv-conditional]