Forums Forums Search & Filter Pro Order post by custom taxonomy

  • This topic has 39 replies, 3 voices, and was last updated 7 years ago by Ross.
Viewing 10 posts - 21 through 30 (of 40 total)
  • Anonymous
    #124767

    Hi there!

    Is any update about this?

    Regards.

    Ross Moderator
    #124871

    Hi Elena

    So sorry for the delay. Ive been swamped and missed this.

    I had another look and still cant see the issue.

    Can you try creating a standard wp query and see if that has the same effect with sorting?
    https://codex.wordpress.org/Class_Reference/WP_Query
    If that doesnt work I think there still might be an issue with the encoding. I believe wp uses utf8_general_ci these days.

    Thanks

    Trevor
    #124883

    Hi

    I just did a quick and simple install of WordPress and Search & Filter with a simple EDD shop, and added your categories to the products, and then made a form, with the category sorted ascending:

    https://sandfdev.cdnwebservices.net/shop/

    As you can see, all works as you would expect. That means that Search & Filter gets it right. Which means that either the theme or custom code in the functions.php file, or a plugin is doing this.

    Anonymous
    #124967
    This reply has been marked as private.
    Trevor
    #124973

    My database was setup by the host (Cloudways) and uses MariaDB 10 (a fork of MySQL), using utf8mb4_unicode_ci as the collation.

    I did try that on yours (it is not hard to change a table from within WordPress, if you know what you are doing), but it made no difference.

    What you need to do is what I did in my test. Make a new WP install, add Search & Filter. Add a few posts with some test categories, set the search form up, add the widget or shortcode to a page (in my example I added the form and results shortcode to a page, it looks basic but is quick and dirty).

    Anonymous
    #125887

    Hi folks!

    I’ve try what you told me about a new installation and didn’t work but i think i have the “problem” closer.

    When i use a Post meta ACF to ordering and filter my products the order is wrong, but if i use the same terms as categories they order perfectly. So maybe is something related to the ACF fields? Your example uses categories not ACF too, isn’t it Trevor?

    I can’t use categories instead of ACF fields because the initial question.

    Again thank you for your help! I hope we can finally find the solution and i wont need to change all the work done 🙂

    Regards.

    Trevor
    #125892
    This reply has been marked as private.
    Anonymous
    #126346

    Hi Trevor!

    I’ve just try the pre-release but nothing happens. Anyway i’ve discovered the problem is the “Is ACF Field?” checkbox.

    If i uncheck the checkbox the order of the lateral options is correct, not yet the order of my results. Hormonales is still the first result showed before those in a category starting with A.
    I’m going to debug a little more to find the problem.

    I appreciate if you have any update.

    Thank you and regards!

    Trevor
    #126407
    This reply has been marked as private.
    Anonymous
    #126885

    Thank you Trevor.

    I can see the problem with the wrong ordering in the list result (not the filter words but the results posts) is a bug related with the “meta value” too.

    If i show the posts without an specific order they show right (inverse alphabetically but right), but when i change to order by a meta value i created it shows me first posts that should be in the middle.

    Meta value

    Is there any way i can follow the fixation of the bug? That way i could tell about the progression to the client who is asking from time to time.

    Cheers!

Viewing 10 posts - 21 through 30 (of 40 total)