Hi (Shane is already aware of this)
I have two issues in sorting taxonomies, one is definetly my issue the other one is possibly a Toolset bug (?)
Shane suggested me to sort my taxonomy using nested views and I did it, so now I have a parent view to sort the taxonomy and a child view to show them.
The one I define "my issue" is that the child view shows the taxonomy multiple times, I can't understand why. I tried different solutions but I can't get them to be shown only once, please help on this, thanks. In the child view, some results are wrongly sorted, and this is due to the other issue.
The issue I believe it could be a bug is related to the parent view. Whatever sorting criteria I select it doesn't seem to return the "natural" taxonomy sorting as defined in WP. Specifically some items are unsorted, items that happens to be the last ones I created or modified. Pls have a look to the attached picture that is related to my test-taxonomy page that shows the results of the parent sorting above and the result of the child view below.
Please let me know if I am doing anything wrong, I'll be happy if it's not a bug ! thanks
Regards
Nicola
BTW - I have checked that all children items in the taxonomy hierarchy are assigned to the right parent.
Thank you for contacting us and I'd be happy to assist.
Some plugins like "Post Types Order" can interfere with the View's order settings. Please make sure that no such plugin is active and WordPress, theme, and plugins are updated to the latest versions.
In case the issue still persists, I'll need to see how these terms and the views are set up in the admin area. You're welcome to share temporary admin login details along with the link to a page where these views can be seen.
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
I apologize for the delay in getting back on this, as we had an unusually busy queue over the weekend.
1. Repetition:
On the page "aaaaa-test-taxonomy" the taxonomy results are shown multiple times because there are 3 views involved, instead of 2.
a) The view named "111" gets the "Offerte" posts.
b) Then it's child view named "Pseudo post taxonomy" gets the attached "Categorie" terms with respect to the current "Offerte" post in the parent view's loop.
c) And then there is another nested view "Pseudo post taxonomy sort", which again shows the current post's "Categorie" terms.
As a result, the final view's output is repeated based on how many "Categorie" terms are attached to each "Offerte" post.
If you'll move the output from the third level view "Pseudo post taxonomy sort", directly in the second level view "Pseudo post taxonomy", this repetition will be fixed.
2. Sorting order:
I noticed that both these views for "Categorie" terms are set to order by "Term group", which is something that was introduced by WordPress but never got fully matured/developed.
In my experience, the most flexible way to control the order of taxonomy terms, that doesn't involve custom code or third-party plugins is by using order by term slugs.
You can add numbers at the start of your term slugs which can be used to control the order while keeping the term titles, intact.
I hope this helps and please let me know if you need any further assistance around this.
I removed the repetition as you suggested, but now it is back as it was before I received indications by Shane.
I added the "Pseudo post taxonomy sort" view following Shane's suggestion in a previous thread that I am copying here below:
"Given that there are hierarchies in your Taxonomies its not possible to sort everything with 1 view because by it will sort it by the parent terms which will place the child terms in between so you will get a setup like this.
A
B
C
- Z
- G
D
- X
- Q
As you can see A,B,C are sorted correctly but the child terms for C and D are not in the correct sort order.
With a nested view setup we can get this.
A
B
C
- G
- Z
D
- Q
- X
Where we have set the short order on the Parent and the Child view."
If I follow these indications, as far as I know, I have to loop over the taxonomy twice (parent and child) but this creates the repetitions (unless you can suggest another solution). Adding a number before the slug makes sense but I believe it will be a nightmare to manage whenever I need to add new categries, re-sort items, bulk load, etc. I will try with just one category where I have the issue and see what happens (it is weird that most of them are ok, but some ...)
I wasn't aware that "was introduced by WordPress but never got fully matured/developed", thanks for this, so I searched Google and found the pugin "Category Order and Taxonomy Terms Order" that has 400k+ installations ! I tried it and it seems to work in most cases, if not I just need to delete the category and recreate it and it fixes the issue.
Possibly a recent WP version added something new to taxonomies management that didn't exists when I created mine, so now I have to take care of it.
Please let me know if you have a better solution within Toolset otherwise I will go this way.
Many thanks
Regards
Nicola