Title: Custom Fields Logic dosen&#8217;t work correctly
Last modified: June 12, 2019

---

# Custom Fields Logic dosen’t work correctly

 *  Resolved [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/)
 * For some reason, the custom fields logic is “or” instead of “and” and there is
   no way to change this even with the premium option. There is an option for changing
   the logic with tags, however, tags are not nearly as versatile as custom fields.
 * This is really hindering how well the filter for this plugin works.
 * Users will click multiple custom fields and be shown 20+ options when there should
   only be 2 or 3.
 * Is there any way to fix this so that it actually works as properly?
 * Any workaround I could do? I need something, it is really messing up how well
   the plugin functions.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-fields-logic-dosent-work-correctly%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11631283)
 * I would also be fine if you told me where in the plugin code to look to change
   the logic behind custom fields, as I could not find it myself.
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11631415)
 * Hi ibenyourbro,
 * Could you give us an example of a few checkbox fields we should click (so we 
   can reproduce the issue properly)?
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11631768)
 * Hey yeah,
 * For example, if you go to the “Cost” Custom field and click “$$$” you will get
   options for “$$$”. However, if you also click ” $$” while “$$$” is still clicked
   you will get options for both of them.
 * The way the filter should work is if I click ” $$$” I get options for that. However,
   if I also click “$$” at the same time, it should only show me options that have“
   $$$” and “$$” ( which there are none).
 * This gets really frustrating for visitors as they are looking for products that
   are using the “terpenes” custom field. As sometimes they are looking for a product
   with ” high total terpene content” and “pinenne (alertness)”( which there are
   a few, but it’s hard to find them when the filter is using “or” logic.
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11635691)
 * OR will always be the default for checkboxes. If it wasn’t, then people would
   never be able to see multiple options.
 * If you want people to be able to only select one option at a time, why don’t 
   you use the radio button control type for your custom field? And, if you don’t
   want people to be able to select a value from a different custom field that has
   no matching values, why don’t you just enable the “Hide Empty Filtering Options”
   option?
 * If you’re looking for functionality beyond this, then, unfortunately, as we mentioned
   in our reply to your email, we aren’t able to take on a customization project
   like this at the moment. We’re working at maximum capacity right now and don’t
   have the availability for it.
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [7 years ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11636065)
 * 1) I want people to be able to select multiple options within a few of my custom
   fields, as some of the products have multiple options.
 * 2) When I turn that option on, it does not recognize products that do have multiple
   options.
 * For example, a product could have the following custom fields checked off in 
   the backend :
 * Cost: “$$”
    CBD Percentage: “Over 20%” Labs: “Pesticide Analysis” “Potency Analysis”“
   Terpene Analysis” Terpenes: “Mycrene(Relaxing)” “High Total Terpene Content”
 * However, if you click these exact filters, the products shown will not match 
   these filters.
 * It will show products that have “Mycrene(Relaxing)” as a filter option, but not
   products with both “Mycrene(Relaxing)” and “High Total Terpene Content” which
   defeats the purpose of clicking both filter options.
 * The same thing happens for labs, it will show all products that have “Potency
   Analysis”, but not products that have all three “Pesticide Analysis”, “Potency
   Analysis” and “Terpene Analysis”.
 * The problem seems to come when you click multiple options in the same custom 
   field. If my products only have 1 filter per custom field, the plugin works fine.
   If you search for a product with these filters, you do get the correct results.
 * Cost: “$”
    CBD Percentage: “15-20%” Labs: “Pesticide Analysis” Terpenes: “Mycrene(
   Relaxing)”
 * However, many of my products have 2 or 3 options in the same custom fields like:“
   labs” and “terpenes.”
 * If having multiple options in the same custom field is an issue, let me know.
   If you have any other possible solutions for this let me know as well.
 * Do you have any idea when you might be able to work on a custom project?
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11646021)
 * There is no ability to select multiple values for the same custom field and have
   it only show results that are assigned to all three values. That will always 
   work as OR. I think an easy workaround would be to just create a separate value
   for that combination (e.g. create a value called “Mycrene(Relaxing) and High 
   Total Terpene Content” or “All of the Above”).
    -  This reply was modified 6 years, 12 months ago by [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/).
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11646423)
 * If that is the only solution, I’ll look into changing it to work that way. However
   with there being many combinations this would make the filter look very bulky.
 * If I was to do it your suggested way, is there anyway to guarantee what order
   the custom fields show up?
 * Okay, here is another question.
 * Is there anyway to better organize the tags similarly to how custom fields are
   organized. Since tags do have the functionality I am looking for, I am wondering
   if there is a way to have my tags display similarly to the custom fields. I know
   on the backend there is tag groups.
 * Is there anything I can do to have those display in their group.
 * Would it be possible with some css ?
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11646506)
 * Also can I get some css to remove the thumbnail button at the top of my page 
   and the divider line underneath it.
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11647199)
 * Also could you look at this page for me.
 * [https://thehempbuddy.com/vendors/](https://thehempbuddy.com/vendors/)
 * Im not sure why “Vendors” with the dropdown menu is there.
 * Nothing is the field, and no product has a custom field for that, yet it is there.
 * Can i get some css to remove it or can you tell me why it may be there?
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11647206)
 * Last thing I promise.
 * On this page.
 * [https://thehempbuddy.com/vendors/](https://thehempbuddy.com/vendors/)
 * For some reason when i click a filter option in the “type of product” field, 
   it will not show up on the first click.
 * For refresh the page and click “Smalls” in the Type of Product field, nothing
   will show up.
 * However, if you click the “clear all” button and then click smalls, it works 
   fine.
 * Any idea what may be causing this?
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11654503)
 * Hi ibenyourbro,
 * > Is there anyway to better organize the tags similarly to how custom fields 
   > are organized. Since tags do have the functionality I am looking for, I am 
   > wondering if there is a way to have my tags display similarly to the custom
   > fields. I know on the backend there is tag groups.
 * To rearrange the order of the tags, click the “Tags” tab in the settings.
 * From there, you should be able to click and drag rows in the table on the right
   side, which will rearrange the order in which the tags appear in the sidebar 
   on the catalog page.
 * **************
 * > Also can I get some css to remove the thumbnail button at the top of my page
   > and the divider line underneath it.
 * `.prod-cat-header-div {display: none;}`
 * **************
 * > Im not sure why “Vendors” with the dropdown menu is there.
   >  Nothing is the 
   > field, and no product has a custom field for that, yet it is there.
 * Is “Vendors” a custom field? If so, can you navigate to the “Custom Fields” tab
   in the settings and verify that “Vendors” is no longer in the list of custom 
   fields?
 * **************
 * For “type of product” field:
 * Would it be possible to send us a screenshot of the “Type of Product” custom 
   field settings page? (you can use a service like [https://postimages.org/](https://postimages.org/)
   to upload the screenshot and it’ll give you a link you can post here)
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11657561)
 * Here is the settings page
 * May have to zoom in a bit I tried to get it all to fit in one screen as im on
   my laptop at the moment,
 * [https://postimg.cc/r0w74zJR](https://postimg.cc/r0w74zJR)
 * Thanks for everything else! Very Helpful!
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11657972)
 * Hi [@ibenyourbro](https://wordpress.org/support/users/ibenyourbro/),
 * Could you go to the Options in the plugin admin, go to the Labelling area and
   put a value in for the “Search Placeholder Label” field? Did it make a difference?
 *  Thread Starter [ibenyourbro](https://wordpress.org/support/users/ibenyourbro/)
 * (@ibenyourbro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11658098)
 * That worked !
 * thanks again
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11658944)
 * Thank you for letting us know!

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Custom Fields Logic dosen’t work correctly’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-product-catalogue/assets/icon-128x128.png?rev=1805317)
 * [Ultimate Product Catalog](https://wordpress.org/plugins/ultimate-product-catalogue/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-product-catalogue/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-product-catalogue/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-product-catalogue/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-product-catalogue/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-product-catalogue/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [logic](https://wordpress.org/support/topic-tag/logic/)

 * 15 replies
 * 2 participants
 * Last reply from: [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/custom-fields-logic-dosent-work-correctly/#post-11658944)
 * Status: resolved