Cannot filter female from male

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Cannot filter female from male

This topic contains 16 replies, has 2 voices, and was last updated by DRayden DRayden 5 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #20216
    DRayden
    DRayden
    Participant

    I am trying to return a search of people by gender, but the logic escapes me.

    I’m using custom fields.

    Checkboxes or dropdown show females when “male” is chosen, but not males when “female” is chosen. The AND and Exactly Like seemed the way to go, but none of the options I choose work.

    ||Select all**
    Female||Female
    Male||Male

    Please help. This seems a simple thing, but I can’t filter the search by gender, a needed criteria.

    Please help. A Google search showed one hit where the person gave up, and others with adjustments to code; but both seemed more complex problems.

    Regards,

    David.

    • This topic was modified 5 years, 4 months ago by DRayden DRayden. Reason: More searches so rephrased the last line
    • This topic was modified 5 years, 4 months ago by DRayden DRayden.
    #20227
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi David,

    I tried to log-in to the back-end with the details, but I am getting an invalid username error. Can you please check that?

    Does the custom field contain any other data, or is it a simple string, that either contains Male or Female as a string? In that case, the ‘Exactly Like’ should be the way to go, as the string ‘female’ contains the ‘male’ as well, thus it will match both.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20231
    DRayden
    DRayden
    Participant

    Hi,

    Thanks for getting back to me.

    I don’t know why, but you are correct. Even the autosave password got a refusal.

    I’ve updated the password.

    I don’t want it to match Male and Female. I want visitors to select Male or Female and only see one or the other. I’m assuming they will only search one role at a time. (We’re not going to be a huge agency, but the numbers will grow.)

    I may have to add other gender selections in the future, as I currently only have “other”, which seems at odds with changing cultural requirements.

    Regards,

    David.

    • This reply was modified 5 years, 4 months ago by DRayden DRayden. Reason: Remove password and privacy restriction
    #20238
    DRayden
    DRayden
    Participant
    You cannot access this content.
    #20247
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20250
    DRayden
    DRayden
    Participant
    You cannot access this content.
    #20256
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi David,

    Thank you very much, now I was able to log-in and test it.
    Do not worry about the questsions, I actually like to help people, and there are no stupid questions. I understand the plugin is very complicated to deal with at the first sight.

    Turns out, there was a bug in the code, with the ‘Exactly like’ operator. It was simply not executed correctly for the checkboxes. I have fixed it via the plugin editor, and will include this in the upcoming release.
    I have also changed the gender drop-down settings to this. I believe that is the configuration you need with that filter.
    I may also note, that if you remove the double star ** before the ‘Select All’ line, it will be unchecked, it might work better in your case, as the filters default is unchecked. I have also changed the values to {get_values} styntax, so that they are parsed automatically. You can of course change that back, if you like it that way 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20259
    DRayden
    DRayden
    Participant

    Hi Ernest,

    Thanks for the excellent response and attention to the problem! First class!

    Along with researching your plugin to get the most out of it, I’ll dig into taxonomies, as I like the idea of removing multiple entries and improving data integrity.

    Kind regards, with thanks,

    David.

    #20260
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20272
    DRayden
    DRayden
    Participant

    Hello again,

    I liked the plugin you recommended. Taxonomies with hierarchies appear on the edit page and once input can be selected – excellent! I can have a Nationality/languages/ethnicity group and add them as I need them. However…

    Unless I’m missing something, Custom taxonomies won’t work as I want. In custom fields I could have sliders and other filter types, but for the life of me I can’t seem to set anything up for taxonomies, and certainly sliders and others weren’t available.

    I wiped the custom fields, and tried just one taxonomy filter, but just get the search bar. I followed the video here.

    I have to sleep now, but could you answer:

    1) Can I have sliders and other controls with taxonomies? One working example and I can carry on.
    2) How do I set up a taxonomies filter like I had before? I can’t even get one drop down to show.
    3) Will I have to have a mix of custom fields (sliders) and taxonomies? This will add complexity to data entry.

    Kind regards,

    David.

    #20284
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi David,

    Thank you again for the details!

    1. Unfortunately no, because taxonomies are separate objects, and their values are strings – thus cannot be filtered via slider types.
    2. I believe you are looking for the display mode feature
    3. Yes, you can do that actually. I would say, that if you prefer using sliders, then numeric values are better as custom fields in this case. For string values (like gender), the usage of taxonomies is probably better.

    Sorry if I confused you with these before. I am already familiar with these, and sometimes I forgot how confusing it can be. Maybe combining custom fields and taxonomies will be more complicated than I thought.

    If you don’t plan to add like tens of thousands of entries, using just custom fields should be still fine, judging by your server setup and performance. I only suggested taxonomies, because I wasn’t considering you wanted to use range sliders for numeric values as well, I overlooked that, my apologies.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20297
    DRayden
    DRayden
    Participant

    Ernest, you are a great service provider, and I’ll for sure rate you highly.

    You’ve answered my questions and I am sure I can now dig in and do what I want with my site, using a mix of both.

    Custom fields for numbers are fine, and certainly better than taxonomies for age/height etc., and far easier to fix per page if a typo, and of course sliders are perfect on the front end for my purposes.

    I love how WordPress has enabled people to create content, and developers like you to offer solutions; and the internet in general for simply getting us connected in ways unheard of a generation ago.

    For all the social media ills of the internet, there are far more benefits. Long may it continue.

    Kind regards, with thanks,

    David.

    #20300
    DRayden
    DRayden
    Participant

    Hello again,

    I’ve reinstalled the plugin after getting in a mess, and solved problems by digging in the documentation.

    One thing remains, and I find I need to ask as I’m exhausted. I have languages as a taxonomy. Each actor (Project) can have more than one language and, later, extra sub-skills such as singing, juggling, VoiceOver etc.

    When I select “Chinese” or “English” as languages, it refuses to display those with “Chinese” and “English” ticked. So, it seems the filter cannot select multiple fields in one taxonomy, or am I missing something?

    I’ve delved into logic, and searched various terms to try and find an answer, but can’t.

    Is it possible to filter for more than one item in a taxonomy?

    Regards,

    David.

    #20302
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi David!

    I am glad you were able to create such a nice taxonomy structure, that should make your future work a lot easier.

    So, by default, the taxonomy term follows an ‘all terms should match, exclude unchecked’ logic for the checkbox layout. In most cases this logic is expected. This means, that selecting ‘Chineese’ and not selecting ‘English’ will exclude those that have both languages assigned obviously (since ‘English’ is unchecked, meaning we don’t need those). I would rather not go into more details, it gets really complicated in no time 🙂

    You can change this logic of course, I think in your case a more loose one will work better. Change this option to ‘at least one of the selected terms should match’ value.
    This will make sure, that any of the checked values is sufficient for a match, and the unchecked checkboxes are not treated as exclusions.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20304
    DRayden
    DRayden
    Participant

    Thank you! I was wondering about a new request, as this may answer another person’s question.

    Feature request – could we have saved versions so we can revert back if a change gives us problems?

    Cheers, and I believe I’m good to go for now.

    David.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.