Custom field filter labels are displaying metadata instead of term title

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom field filter labels are displaying metadata instead of term title

This topic contains 4 replies, has 2 voices, and was last updated by thenetking24 thenetking24 4 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24203
    thenetking24
    thenetking24
    Participant

    Hey, me again, thanks again for all the great support so far.

    I have one issue, that I have tried solving 2 possible ways. My problem is, that when I use Frontend Search Settings -> Categories & Taxonomy Terms to pull my taxonomies into the filters, the frontend’s checkboxes are all checked by default which myself and the client find that very confusing.

    So I found a work around that seemed to work fine for a bit, and all the sudden today I’m having an issue. What I did is instead of using Frontend Search Settings -> Categories & Taxonomy Terms, I’m using Frontend Search Settings -> Custom Fields, to pull in fields that are actually synced to the taxonomy via Advanced Custom Fields. The only reason I am doing this, is because the Frontend Search Settings -> Custom Fields filters are unchecked by default and behave the way I need. Everything seemed fine for a while, but all the sudden I’m seeing ID numbers or metadata output a:3:{i:0;s:2:”78″;i:1;s:2:”70″;i:2;s:2:”67″;} depending on the data type. I was originally under the impression that this was an issue from the ACF plugin/data, but now I wonder why ASP isn’t handling metadata from the database, no matter how it got there.

    So my question is, is there a way I can use Frontend Search Settings -> Categories & Taxonomy Terms and not have the checkboxes checked by default? I tried overriding this after the page loads with JS, but then the filters do not behave properly. If this is not possible, do you have any input or known limitations with the metadata not converting properly into filter labels via custom fields?

    I can get this install on a production server and give access of that helps.

    Thanks again!

    Attachments:
    You must be logged in to view attached files.
    #24208
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sure, you can set the appearance of the taxonomy term filters, as well as the checkbox default statuses here: https://i.imgur.com/m4lvfCj.png

    The custom fields part should work as well, as the ACF fields are auto-detected and requested from ACF directly. There are actually 3 redundant methods to handle those fields, but yet it still does not work in some cases. I noticed that it has something to do how ACF loads on certain pages, depending on the page type. We researched the whole web for this, some other devs had similar issues, but no solution to it yet, it is so inconsistent.
    Some pages have the issue, some don’t, it also depends on the data type and many other things, it is really a nightmare to debug.

    If it’s possible, I would rather suggest using the taxonomy terms.

    Best,
    Ernest Marcinko

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


    #24238
    thenetking24
    thenetking24
    Participant

    Ah ha! I was looking for those options under the “+ See more options” for each included taxonomy. I was assuming the change display mode button was going to change the way I could find the taxonomies I wanted to include. Thank you for pointing this out.

    The filter checkboxes that are displayed for custom fields work differently than the taxonomy ones. They all start unchecked, but filting is not active at this point, and once you click one, filtering begins and results are narrowed. But with taxonomies, starting with them all unchecked, filters the results down to nothing right on page load. But for now I am able to just active the ‘select all’ checkbox, which allows the user to first disable all filters, and then select the one they want to filter, which I still find slightly cumbersome.

    Thank you so much for your time, and thank you for the insight on the ACF issue, you have confirmed my suspicion.

    I may actually be out of questions for you, thanks again for everything. I’ll send you a link once the system is live in case you would like to check it out.

    #24242
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You are very welcome 🙂

    I recommend checking these options as well, it might be something to help you out: https://i.imgur.com/FDeFp3U.png
    Changing the first one, adjusts the logic how the checked terms should match the results. The second one basically allows ignoring the filters until one item is checked – that is probably something you are looking for.

    Best,
    Ernest Marcinko

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


    #24253
    thenetking24
    thenetking24
    Participant

    Thanks again.

    I’ll give these a try once the data is loaded. I had messed with these in the past and assumed they worked differently. I work on too many projects at once and confuse easily lol.

    Feel free to close this. Take care.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Custom field filter labels are displaying metadata instead of term title’ is closed to new replies.