Skip Navigation

[Resolved] Taxonomy View with a Taxonomy View

This support ticket is created 5 years, 9 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 12 replies, has 2 voices.

Last updated by Ljuba 5 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#923275
002.png
001.png

Tell us what you are trying to do?

BASICS

1) Post types hierarchy (one branch) is Destinations > Businesses > Accommodations > Rooms > Beds

2) Display post type is "Business" ('nested posts' should be displayed)

3) Accommodations contains 11 groups of taxonomies ('Amenities'). Single group taxonomies Views are created and looks/works fine.

4) Single post template is going with Layouts (Elementor is for other purposes).

DESCRIPTION

Single taxonomy group View have two columns. I need to make section of three (or two) columns Views groups. As Content Template don't have the Loop, problem appear if some taxonomy groups will be empty and Views without Loop must be assigned to columns. So, if ie first column will have all empty taxonomies, column will be empty while second and third will be full. Single group View trough Loop solve that nice vs empty taxonomies (distribution between two columns). I want to do same with Taxonomies Views (but in two or three columns).

QUESTION

How to do it?

I attached illustration images (hopefully enough clear for understanding).

Is there any documentation that you are following?

https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

#923462

I am not clear on the entire setup.

Do you happen to have a staging site where we could work on this together?

If so, can you share with me:
- the Page where you want to show this
- As it seems you have working examples, can you link them so I can see them?
- Can you link as well the backend edit screens for the involved and displayed types with a simple set of chained post examples?

I can then work with you in the staging site as long it is about setup.
As soon we discover there is misbehavior pointing to a BUG we would then follow the usual process (grab a copy and escalate to debug)

Let's see how we can solve this on a real example.

#923863

I forgot. Thanks to time zones, no issues in schedule.

1) You will see same issue in Habitaciones Layout (collapse to see).

2) You also can see that repeater fields not working (in other topic you wrote that it will in next - so, just reminder).

3) Maps not working (or I don't know to set it).

#924032

1. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-923634

I understand.

A few Notes:
- unless you programmatically integrate Toolset Layouts (which I can explain how) you cannot nest Layouts.
- I suggest, if you do not need Layouts, do not use it.
- If you require it's drag and drop please acknowledge that there are limitations (no conditional rows, no nested layout if not integrated, no js tags in raw HTML editors are the main)
- If you use it as it is now with this theme it will allow you to edit the content part, and that works, so of course you are free to use it.
- 3) "- Can you link as well the backend edit screens for the involved and displayed types with a simple set of chained post examples?"

The thing is even now, I do not know where you build what in the backend.
Please provide me the links to the Layout (I have that already) the Views, the Post types and posts involved.

I see for example here:
hidden link

When I edit that post I see there are not many posts connected, and the one that is (hidden link), is I think the one in question here?
If this is so, can you please explain what the issue is (what you want to add, what you want gone) on that page?

About time schedules, my working hours are here:
https://toolset.com/forums/users/beda-s/

I suggest not to work on anything as long you provide a site for debug.
However, here I do not need you to stop work on it for now.

2. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-923863
- You will see same issue in Habitaciones Layout (collapse to see).
I do not unterstand what you mean here.
- OK
- As usual, we need a new ticket.
I have no details here to open one myself, can you open one describing the issue in detail?
Or you provide them in the next post and I will split it.

#924259

I will split replies.

LAYOUTS

I started with Divi, but I found a lot of issues and I quit. I'm now going with Genesis + Elementor, what mean that I will rather stick to make all with Elementor (and that is possible, in theory). To do it all in Elementor, I have issue:

==> How to 'nest' the child posts?

If yuo know the answer, I can (I would like) to quit Layouts. Otherwise, I don't see alternative.

'NESTING' - or - Why I need layouts?

Real life example. Legal entity (company > read, Negocio) have two business types activities (Accommodation and Restaurant) and both in 4 locations (yes, I know/have the client). Logically, they would prefer to have only one user account (mean, one page) with all 8 activities (2 per location). They don't want to open 8 user accounts and register 4 hotels and 4 restaurants. Owner, business name, RUC (VAT number), Policy & Conditions - it is all the same for each activity.

'Normal' scenario to 'nest' child post types could be to 'nest' View within View (that's the topic also). But here I found two limitations:

1) In other topic, with Minesh, we found that Elementor not support Views. So, I can do HTML (also conditional) display of fields within Elementor Template and to assign that Elementor Template via Elementor shortcode to Content Template of the Post Type - and it works. But if such Elementor Template contain Views, final post will not display it AT ALL (in Elementor preview - yes, but in Post - no).

So, if I cannot 'nest' (to use at all) Views in Elementor, I simply must to use Layouts. It is not may choice.

P.S. If I will use Divi or Beaver Builder, 'nesting' child posts Content Template should be easy task. Actually, probably only Beaver Builder will be able to solve all issues, but I don't have the license for it (only Divi and Elementor) and I can't afford to pay it for testing is it indeed 100% sure solution.

2) I can't see the way how to 'nest' Taxonomy Views within View. Simply, such scenario is not visible in Wizard. There is options to make it for Post, Users and Taxonomy (single), but there is no options to do it for Views.

In other words, how to make Loop of other Loop, as it must be assigned to something?

MY EXAMPLE

You can see simple Layout of Habitaciones. It is one single simple HTML editor cell (so, theoretically ideal for Elementor, instead of Layouts, too). But it should to contain (at least) one View of 'nested' Taxonomies Views (8 Taxonomies for Room Amenities).

As this is - 'What you want to do?' question (this topic), I will post it in next reply.

Here, I hopefully explained why I use Layouts (and I will prefer to not, but ... I can't see the other option as I can't use Views in Elementor).

P.S. - If you doubt, I can make it in Elementor (as it is simple HTML) to show you that it will not works.

#924308
Selection_002.png
Selection_001.png
basic_partial_schema.jpg

BACKEND

1) To facilitate understanding, I attached on basic partial schema.

2) I have (bad) habits to hide something what I don't need too much. So, Rooms and Beds are 'hidden' in submenu (see attached image). However, you can also access (edit) related posts via relationship feature on the bottom of parent/child post (see image), as I connected what I need to connect for now (so, it is not all connected, what you can see from schema image).

3) Here is hierarchically sorted posts backend links:

Destinos (not relevant for topic) ==> hidden link

Negocios ==> hidden link

Alojamientos ==> hidden link

Habitaciones ==> hidden link

Camas ==> hidden link

NUMBER OF POSTS

Yes, there is only one DEMO Negocio (with subsequent DEMO child posts). For now (sinle.php template - not archives), no need for more posts.

#924333
105.png
104.png
103.png
102.png
002.png
001.png
101.png

"If this is so, can you please explain what the issue is (what you want to add, what you want gone) on that page?"

There are two post types with 100% same issue and you can see both - Alojamientos (taxonomy views are visible) and Habitaciones (taxonomy Views are collapsed).

It is not that I want to add or remove something. I want to get 'Views (8 or 11) within View' or 'Loops within Loop'. Why? It is no option how anybody can predict average number of selected taxonomies. On image is actual state of Alojamiento Layout where you can clearly see huge list of Taxonomies on the right ("Instalaciones y servicios de Hostal Bumba") sorted in 11 sections (taxonomies).

Left side is 'empty like Ghost' (see image 101 and 001).

GOAL OF QUESTION

I need evenly distribution of taxonomies, as it can be done in View for single taxonomy via 'Loop feature'. I tried that directly in Layout HTML, but it not works. Obviously for Loop must be View instead of Layout or Content Template.

Evenly distribution of taxonomies mean to look similar to image 002 (manually done distribution of items).

Image 102 shows that I can't make View as there is only options to make it for posts, users and SINGLE TAXONOMY. I need it for TAXONOMY GROUP. Taxonomis are with radio button and not checkboxes, so only one is possible to be selected.

So, in View I can make evenly distribution of items within single taxonomy and I did it (visible on screenshots) as it is done via Loop feature in View.

I can't see option to make evenly distribution of group of taxonomies, as there is radio button within taxonomies selection. There is no multiselect option for taxonomies as it is for posts (see image 103). But that will be wrong. Views missing selection number 4 (post, users, taxonomies and VIEWS). That option to make Views within View should to have checkboxes for multiselect. That's what I want to do, if I can do now - evenly distribution of group of taxonomies ('Views within View').

"- You will see same issue in Habitaciones Layout (collapse to see).
I do not unterstand what you mean here.
"

See images 104 and 105. There are 8 Groups of Room Amenities Taxonomy.

Backend of Layout is ==> hidden link

Backend of Post Type is ==> hidden link

#924366
rfield_002.gif
rfield_001.gif

"- As usual, we need a new ticket.
I have no details here to open one myself, can you open one describing the issue in detail?
Or you provide them in the next post and I will split it.
"

No problem, but I prefer that I expose it here and that you open tickets as it will be the time/resource wasting to introduce another supporter with all details.

(ordinary) REPEATER FIELDS (BUG???)

Hopefully animated GIF is supported. I will try. Also I will split it in two as size is slightly over 1 MB limit.

P. S. - ENTIRE SITE IS WITHOUT ANY SINGLE REPEATER FIELD GROUP!!!

Backend is ==> hidden link

On GIF you can see:

1) Post contain two ordinary repeater fields - Single Line and Image (you can try it on both).

2) Post atabase keep only last record (what show also front page > Opciones - green lines) - XXXXXXXXXXx.

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/repeating-fields-save-just-last-value-in-repeating-array/

#924379
202.png
201.png

"- As usual, we need a new ticket.
I have no details here to open one myself, can you open one describing the issue in detail?
Or you provide them in the next post and I will split it.
"

Next

2) MAP DOES NOT SHOW MARKER (BUG???)

Documentation ==> https://toolset.com/documentation/user-guides/display-on-google-maps/#maps-on-frontend

(relevant part --> "Display a map with a marker for a single item")

Backend ==> hidden link

Layout ==> hidden link

(section --> "Detalles de resumen")

Code (used) ==>

[wpv-map-render map_id="map-2" map_height="160px" fitbounds="off" general_zoom="18" single_zoom="18" general_center_lat="-0.46171546266527413" general_center_lon="-80.45724778343242" single_center="off" marker_icon="//canoaturinfo.com/wp-content/uploads/2018/07/test_marker.png" background_color="#ffffff"][/wpv-map-render][wpv-map-marker map_id="map-2" marker_id="marker-2" marker_field="wpcf-ubicacion"][/wpv-map-marker]

EXPLANATION OF ISSUES (there is more than one)

1) Image 201 shows how on backend is correctly marked and kept in database values.

2) I tried to use 'raw' steps, but map don't hold the focus. That's why I switched to manually set focus (see code).

3) It is irrelevant did I use custom marker or default (for display outcome).

4) Image 202 shows (red square) where marker should to appear (at front hidden link)

ISSUES

1) Impossible to make focus (or I don't know to do it).

2) No marker on the map (I did something wrong?).

3) I can't see how to disable view of nearby places set by Google. It is OK to be displayed on big map and not OK on small map.

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/maps-not-working-4/

#924503

Finally (for today).

You are right. It looks that now I can use Elementor instead of Layouts (views allegedly works).

P.S. Now are Layouts disabled (not deleted). Instead of Layouts and/or Content Templates, Elementor Templates are in use. At first view, all looks same (great).

1) First problem is sort of BUG (or I did something wrong). To reproduce issue, go to hidden link

Try to check/uncheck taxonomies and refresh post front view. You will see that only first taxonomy working correctly (Accesibilidad). ALL OTHERS are without reaction (all remain displayed).

On front I intentionally used Toolset View widget (to drop down the problems of eventually wrong shortcodes).

2) Now I have NO IDEA how to set child post view (Rooms), as scenario from https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/ not working.

P.S. Today Toolset plugins updates are done and all above eventual BUG's are same.

#948721

RESUME

In meantime

1) I get Elementor to work well with View (at least, I think). I could be wrong, but i needed to add 'elementor -template' custom shortcodes and than View loaded templates well and directly.

2) I get Taxonomies to properly act (load) in View (my bad, wrong View settings). Also conditional logic works well (zero checked taxonomy groups are not shown).

3) I get Maps and markers (my bad, by tutorials are bad - I used code from reference site). However, still something going wrong (Street View - see below).

REMAINING (BUGS???)

1) "Views in View Bootstrap" (TOPIC) not working (for me). I tried in two ways and zero progress.

One is to create (ie Room Amenities) Post View of (single) Taxonomies Views (should be right approach). Ideal will be if (single) Taxonomy View will be in one column and that Post View will sort them in 4 (or 2, depends) columns. However, Bootstrap refuses to handle (single) Taxonomy Views in more than one column. So, it load nested Views, but just in one column (whatever number I set).

Second way was to directly create Post View with belongs taxonomies (so, without creating single taxonomy views), where Bootstrap logically should to load 4 columns (as it is initial (only) View), but again, ZERO (show all in one column).

2) Ordinary repeating fields are nothing to do with View, but they don't store data in database, not even after last Types updates. You can try yourself. I don't think that I was able to make here any mess by myself.

3) Street View not works well and it works well in original Street View. So, issue is that it shows location more than 100m far from actual location. Originally, Street View don't show location as you must first to activate it and than it shows street blue lines where you should to point starting point. That will probably noot be the case if there is also internal Street View of the place, but that is not the case in majority.

Obviously, Toolset tried to do 'workaround' and to "jump" from the pin coordinates "on the street" (as Street View is outside), what was basically mistake as now everything is 'moved' (jumped) arbitrary. My idea was to create another field for Street View (instead to use the same coordinates) as than I can (user can) to control from what point of the street he want to get Street View. Now, there is the problem to programatically set that feature. You can see correctly set and displayed marker on big map "Cerca" and you can see that place have angle of two streets. So, what will be right display??? Obviously is needed another custom field. However, I can't set it as whatever coordinates I place, he shows me the same (and wrong) initial picture (another angle of another street - cca 100m - so, it exists). BTW, Street View on the map not working, as well. You can click indefinitely and it will not open Street View.

Just one additional question - can I disable Google Nearby icons (is it there some option)?

TOPIC

To stick on topic. Please, point me how to set "Views in View". In meantime, I will only touch (work on) fields related to Policies, what should not to affect (disturb) you.

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/some-bootstrap-issues/

https://toolset.com/forums/topic/some-maps-issues/

#950042

Hello, I am sorry the delay.

1. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-924259

==> How to 'nest' the child posts?

I do not know what you mean, but if you refer to the same as the child/parent Layout you can use in integrated Themes and Toolset Layouts, I honestly do not know if that is possible in Elementor Pro or any other templating plugin.

==> Otherwise, I don't see alternative.

Related the rest of the feedback on this specific post, you do not need Layout to display related content.
Nested Views, are something you do use to pull posts that somehow relate to a post that comes from a "parent View".

This is entirely unrelated to Layouts or Elementor.

However, since you mention Elementor, this week major updates will introduce compatibility to Elementor.
You will design templates of Elementor with Elementor and Toolset Data.

Maybe it is woth to wait fort this update so you can display your content with it?
However, the nesting part, is irrelated to how you display this.

2. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-924333

==> Obviously for Loop must be View instead of Layout or Content Template.

I see we have some basic misunderstandings here.

Before you proceed using Toolset, please clarify the usage of each tool.
It is helpful later to know what to use when.

1. Content Templates:
Style SINGLE posts (can assign to many single posts)
2. Template Layouts:
Style SINGLE posts (can assign to many single posts)
3. Content Layout:
Style SINGLE post (can NOT assign to many single posts)
4. View:
- LOOPS (like the WordPress Loop)
- Many SINGLE posts are shown on the same list.
https://toolset.com/faq/
https://toolset.com/faq/whats-the-difference-between-a-view-and-a-view-template/
https://toolset.com/documentation/user-guides/when-to-use-content-templates-instead-of-layouts/

==> There is no multiselect option for taxonomies as it is for posts (see image 103)

No, there is no such option and that is for a good reason.
There is a request to allow that, but it's not decided yet if or not we can.
It's related to performance issues.

==> Views missing selection number 4 (post, users, taxonomies and VIEWS)

This is and will never be possible.

Instead, you need to nest Views.
This is described here:
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

What you do is create a "Child" View, and there you choose a Query Filter that says "Parent is the taxonomy selected by the parent Taxonomy View" (in the case of a taxonomy View)

This way you can create a list of Parent Terms (which have no parent)
Under each you can create the child term lists.

This is as far you can group and nest Terms in WordPress.
You can group them as well by some custom fields, and then add a query to the View that looks over those terms so to output only the ones that are having the same value.

But, there is no way to group several Taxonomies in one single View.

And, single Taxonomies, since they are NOT related in the WordPress System at all within each other, cannot be shown as related either.

This means, each View, has to query it's own Taxonomy/Taxonomy Tree.

3. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-924366

I cannot replicate this.
I split it here:
https://toolset.com/forums/topic/repeating-fields-save-just-last-value-in-repeating-array/

4. https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-924379

I split this here to analyze, although locally al worked great:
https://toolset.com/forums/topic/maps-not-working-4/
I saw one similar issue, where the cache of the server served a wrong (old) js File.
I suggest to check cache issues.

5. I see all #points above where meanwhile solved as due to wrong settings or approaches and using the Elementor.

I do not need to mention that these issues here are new:
https://toolset.com/forums/topic/taxonomy-view-with-a-taxonomy-view/#post-948721
1) https://toolset.com/forums/topic/some-bootstrap-issues/
2) https://toolset.com/forums/topic/repeating-fields-save-just-last-value-in-repeating-array/
3)https://toolset.com/forums/topic/some-maps-issues/

Topic's conclusion:

To nest Views and pull data from a parent View, use the Query Filters and insert the "nested" view to the "parent" view loop
This is described here:
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

#950483

No problem for delay. Thanks for help. Yes, most are solved and you correctly opened remaining issues new tickets.

So, we can close this.

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