Skip Navigation

[Resolved] Distance from filter based on parent post address field – part II

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#1629899

Hi Shane,
My goal is to have taxonomy items sorted by their hierarchy: if term B is child of A and C is child of B I should see A,B,C.
In the view Pseudo post taxonomy, I've tried to sort by group and - as you know - some items fail the hierarchy. I tried to sort by name, same issue, but not for the same items!
Take item "SAMSUNG Smartphone Galaxy Note 10 +" as example: if I sort by name, categories are correctly displayed by hierarchy (Telefonia, Cellulari e smartphones) but not if I sort by group (items reverted). Same for all the Telefonia category items.
The opposite for some other categories. Take "LENOVO Notebook Ideapad S130-14IGM" as example. Correct categories are displayed if the view is sorted by Term group, otherwise they are reverted.
Wild item: the item "IROBOT IROBOT ROOMBA 965" it's always wrong, no matter what sorting is selected. (Robots, Casa e giardino, Elettrodomestici, -> it should be: Casa e giardino, Elettrodomestici, Robots,)
In the view Order by dropdown other "Term Field ..." items appear but I believe they are by Avada not by Toolset so I'm not sure if they are useful.
My front end pages and views return geolocalized results now so you probably see no results in your country. Please access offers from the Offerte admin menu item.
Thanks and regards
Nicola
PS-In these days I am doing data load tests so you could see posts appearing and disappearing. Not the ones mentioned above though.
PS2- Is there a way not to display the comma after the last category item ? I mean: "Casa e giardino, Elettrodomestici, Robots" instead of "Casa e giardino, Elettrodomestici, Robots,"

#1634577

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicola,

Regarding the sorting. Essentially the sorting is working correctly but there will be a few semantics that you may need to nest your views so that the child items are sorted correct.

Essentially you will need the Parent view for the Top level items and sort that and then within that a Child taxonomy view that will display the children of the parent sorted as well.

If you try to sort both the parent and child terms using 1 view then it won't work.

Regarding the commas you will need to format your view like this.


<wpv-loop>
          [wpv-item index=1]
         Template goes here
          [wpv-item index=other]
          , Template goes here
        </wpv-loop>

Now you just need to replace template goes here with the [wpv-post-body] shortcode that is loading the view's content template.

Please let me know if this helps.
Thanks,
Shane

#1637173

Hi Shane
Commas - ok it works, thanks, but an extra space is added before the comma. I have tried the solution suggested by Luo Yang a few days ago to another user #1633963, it worked for him, but it doesn't seem to work for me, I still get the space.... any suggestion ? if it's a bug I can live with it until it's fixed.

Sorting taxonomy - can you please elaborate more on this ? I just need taxonomies to be displayed with their own "natural" hierarchy, nothing more. I am surprised that this isn't included between the Toolset sorting criteria. How can I create views to sort hierarchical levels by parent ? not all categories have the same number of hierarchical levels ...
Thanks
Regards
Nicola

#1638229
pagination.png

Hi Shane
I know I should open a new ticket for this, but you already have access to my site so I am posting it here.
I have a view where I'm trying to apply pagination but pagination controls (the li -s) don't appear on the page (neither in the code, see picture). Could you please check view A3b Archives, page aaaaa-test2 . I tried to position controls everywhere with no success. I do need pagination on this page. The view uses some other nested views, I also tried to remove them, same result.
Thanks
Regards
Nicola

#1639101

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nicola,

It would be best to open a new ticket for this second issue given that this thread is already 5 pages long. It makes it extremely difficult for other users to track the resolution when the forum thread is so long.

I have tried the solution suggested by Luo Yang a few days ago to another user #1633963

Can you send the actual ticket link for this so that I can have a look.

How can I create views to sort hierarchical levels by parent ? not all categories have the same number of hierarchical levels ...

In order to do this you will need to do a nested view setup and sort the parents first and then the children. This documentation below explains the nested view setup.
https://toolset.com/documentation/user-guides/views/using-a-child-view-in-a-taxonomy-view-layout/#taxonomy-view-within-taxonomy-view

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.

Please let me know if this helps.
Thanks,
Shane

#1639605

Hi Shane,
Comma - I found that using

<wpv-loop>
          [wpv-item index=other]
         Template,
          [wpv-item index=last]
          Template 
        </wpv-loop>

solves the space issue.
AFA the sorting issue is concerned, I have opened a new ticket as you suggested. Please see "Taxonomy sorting issue" ticket.
Thanks
Regards
Nicola

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.