Display a field if no other fields are shown

Hello @rocketpig3

You can do it with only one calculated field instead of using three. That would give you more control about the elements to display or hide.

For example, assuming you have three slider fields, fieldname1, fieldname2, and fieldname3, and the corresponding HTML content fields to display or hide the fieldname4, fieldname5, and fieldname6, and the HTML field to display when no other are visible the fieldname7.

Now, I’ll assume your current equations are:

For the first calculated field: fieldname10+fieldname11. If the result is greater than 20, display the HTML Content field fieldname4.

For the second calculated field: fieldname20*fieldname25. If the value is less than 100, display the HTML Content field fieldname5.

For the third calculated field: fieldname18+fieldname14 and if the value is equal to 15 display the HTML Content field fieldname6.

If none of the previous HTML Content fields are visible, display the HTML Content field fieldname7.

These equations and fields’ names are hypothetical. I selected them only to describe the process.

Now, I’ll implement the process with a unique calculated field, including to display the fieldname7 field if the previous HTML Content fields are not visible:

  let display_7 = true;
  let slider1 = fieldname10+fieldname11;
  let slider2 = fieldname20*fieldname25;
  let slider3 = fieldname18+fieldname14;


    display_7 = false;
    display_7 = false;
    display_7 = false;

Best regards.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer