Forums Forums Search & Filter Pro Taxonomy to Meta key

Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #259556

    Hi!

    I made a taxonomy with CPT UI and I can see it on my Search form page. However, I want the taxonomy to be only in the sorting option, not for visitors to see in the front end. So I assumed the taxonomy to appear to Sort options -> Meta value -> Meta key, but didn’t. So what am I missing to get this to work?

    Trevor
    #259602

    If data terms are stored as a taxonomy, they cannot be sorted, as taxonomy data are stored as serialized data (multiple terms, like an array) per post (which term in the array would you sort by?). Even if only one term per post is used, WordPress still stores them like this.

    Make a custom field and allocate a value you can sort by, but, be warned, if a post does not have a value in this field, then it will not appear at all in the results if you use the field to order by. Custom fields can store data as single values or serialized data, so those set to store the data as single values can be sorted.

    Anonymous
    #259809

    Hi,

    Thanks for you message. I managed to insert additional information with ACF. I made a test with three values (1100, 387 and 3620) and I managed to short them wrongly at my site. They go by the first number to an order, not by the actual number “size”. As in, I wish to short them from smallest to biggest (387, 1000, 3620) but the result is 1100, 387 and 3620. So how to fix this?

    Trevor
    #259819
    This reply has been marked as private.
    Anonymous
    #259825
    This reply has been marked as private.
    Anonymous
    #259827
    This reply has been marked as private.
    Trevor
    #259920
    This reply has been marked as private.
    Anonymous
    #259922

    Done.

    Anonymous
    #260002
    This reply has been marked as private.
    Trevor
    #260193

    Thanks for updating me. Please let me know if you get it working fully.

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