Skip Navigation

[Resolved] How to build this structure?

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

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

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 11 replies, has 3 voices.

Last updated by BenjaminH2340 4 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#1729775
Web 1920 – 1.png

Hello,

I need to create a flexible structure to manage extensive data. I have not yet built a structure of this kind with Toolset and I'm not sure how to implement it ideally. I hope you can help me with this?

For better understanding I have attached a picture.

First of all: The whole page is created with Divi. Except for embedding a view, the rest can be done completely with Toolset.

On the page I create is a shop for certain vehicles and models. I would like to have a section on the start page that lists all vehicle manufacturers (1) - probably as a slider. Clicking on a manufacturer will open the archive page for Audi (Level 1).

On the Audi archive page all car models are listed on the left (2) as well as various keywords / areas related to the manufacturer (3). In this case we simply speak of areas into which spare parts are divided (e.g. tyres, rims, body parts, engine parts, etc.). Otherwise this page is designed to optimize the keyword "Audi". Therefore you will find here a general text about Audi (4), Woocommerce products of Audi (5) - in the end this is all products collected in the further levels which are divided into the models and areas accordingly. If you select a model (e.g. by clicking on Audi A1), you will go down one level.

On the archive page Audi A1 (Level 2) all areas for the Audi A1 are listed. So Audi A1 tyres, Audi A1 body parts, etc. (6). Additionally there is a text about the Audi A1 (7) and the spare parts about Woocommerce that fit the Audi A1 (8). By selecting the respective area (e.g. Audi A1 tyres), it goes one level deeper.

Here is again a text about the topic of the page (9) and the final Woocommerce products (10).

It is possible to select an area in level 1 instead of one of the car models (3). If you click on it, you should find the list upside down on the following page (Audi A1 tyres, Audi A2 tyres, Audi A3 tyres, etc.)

Independent of the integration of the Woocommerce products - how does the whole thing have to be created to create this site structure accordingly?

Will there be a problem loading the view in a Divi layout?

Thanks a lot in advance.

#1730735

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Based on the structure you shared - it probably looks like you can achieve this with Toolset where it may or may not need some customisation.

I need to understand first how you configure the Audi - is Audi is a Woocommerce product as well as how the " car models " are configured - is it as Category or WooCommerce attribute?

- how vehicles and models are configured.
-How manufacturer are configured?
- Is Audi is actually a category and does category will have sub-category?

It seems to me based on your descritption that you have:
- Category archive (that should display the products belongs to the selected term archive) - level-1
- Sub-category archive (that should display the product belongs to selected sub-category term archive - level-2
- I do not yet understand the point 9th and 10th.

So, it would be great if we can divide the whole requirement into small task and move step by step.

If you configure a test site and configure the archive and send me the link where exactly you will require the further help that would be really help us to understand your structure and that will help me to guide you in the right direction.

Please check the following kind of related ticket where I've proposed the solution using two archive:
=> https://toolset.com/forums/topic/set-up-product-archive-with-filter/page/2/#post-1675889

#1731041

Hello, Minesh,

in principle, it is quite simple. The vehicle manufacturers (Audi, BMW, Mercedes-Benz, etc.), the models (A1, A3, A4, A5, etc.) and the areas (tires, rims, engine parts, etc.) do not yet have a predefined type. We can create them as Toolset allows and remain flexible in handling. That means we can create categories, taxonomies or whatever. They are NOT Woocommerce products. This structure is only intended to display suitable Woocommerce products and blog posts on the respective pages.

Vehicles, models and areas are created independently and manually. The integration of the Woocommerce products is then done via shortcodes or embedded search filters. The Woocommerce products come from an ERP system and will get certain characteristics and vehicle properties at a later time, which can be read out.

The archive levels are structured in approximately the same way with regard to layout. The difference is that they start out very general and become more and more precise or more and more detailed. Level 3 is nothing else than (in this example) the last level where you get everything broken down in detail. So if you are looking for rims for your Audi A1, you will find all rims for this model on this page.

Basically the whole structure is used purely for search engine optimization. Therefore many subpages have to be generated here, with a clear and unambiguous link structure and suitable content.
Cars - domain.com/cars/
Audi - domain.com/cars/audi/
Audi A1 - domain.com/cars/audi/audi-a1/
Audi A1 tyres - domain.com/cars/audi/audi-a1-tyres/

You can see a live example with this principle here (this is not a WordPress page): hidden link

As you can see, all Audi models are listed here.
In addition, there are several categories / sections with many subitems (in this case "Kategorie" and "Lieferservice"). Depending on what you select in the menu on the left, its composition changes on the bottom and the selected content on the right. Please just click here on Audi A1, Audi Used Cars and Audi Munich and see what happens with the menu, the content and the URL.

The clou about this is that you enter the car manufacturers and models individually in the backend. In addition, you also create all the other keywords separately. The system will then create the own subpages with the composite content. Afterwards you only have to fill the created subpages with individual text (see the whole bottom of the page).

Unfortunately I'm missing the approach how to do this with Toolset. So... I like to set up a homepage, but how do I structure the data best? What do I create as categories, what as taxonomy? And so on.

Let's break this down into several small steps and start with the basics.

#1734209

Hello Benjamin. Minesh is on vacation for a couple of days. If you don't mind, I'll continue with you on this ticket!

First, I need to comment on a couple of points before elaborating further on this use case.

DIVI, especially version 4, is not fully compatible with Toolset, and we currently suggest to separate their use. Use Divi for pages where you do not need Toolset. And use, only, Toolset in pages where you want to display/handle elements from your data model.
- https://toolset.com/2019/10/toolset-and-divi-4-issues/
- https://toolset.com/2020/01/how-to-build-advanced-sites-with-toolset-and-divi/

URL structure must follow some rules imposed by WordPress. I am afraid, this subject can't be explained in one reply. So, I'll suggest a couple of articles for reading:
- hidden link
- hidden link
The URL structure can be customized with custom code as explained in this WordPress documentation article https://codex.wordpress.org/Rewrite_API/add_rewrite_rule
The following articles elaborate more on the subject:
- hidden link
- hidden link

This being said, I still need to know what are the posts that you would like to display on those archives? I understood you want to display WooCommerce products, such as "Tyres for Audi A1", right? Please correct me if I am wrong.

If that is the case, you won't need to create a custom post type for that. You will be using WooCommerce products.
You may, then, use WooCommerce categories, tags, and attributes for the desired structure. Please read more about these on the following articles:
- https://docs.woocommerce.com/document/managing-product-taxonomies/

You may also create custom taxonomies, using Toolset, to organize the products. A custom taxonomy for the "Manufacturers"(Audi, Mercedes, etc.), It may be Hierarchical if you want to introduce models too(Audi A1, Audi A3, etc.)
You may also create an additional taxonomy to organize the other areas, such as tyres, rims, etc.

The example page that you have shared is about cars(cars as products), is this what you want to implement, or do you want to list other types of products(tyres, rims, parts.)?

I prefer to ask more questions and get to know your use case more in order to better advise you. I hope you will agree.

Looking forward to your reply.
Jamal

#1734329

Hi, Jamal,

that Divi is not fully compatible, I am aware. I try to keep the contact points of Toolset and Divi as small as possible. However, it will not be possible to prevent it completely. It may well be that a Toolset view simply needs to be embedded into a Divi page. I also used the Divi Theme Builder, which defined the header and footer areas. The data structure itself I want to map completely in toolset. I hope this works in the slight interaction of the two components.

The topic with the URL structure I have to look at in detail. This seems to go a little deeper into the matter. For the beginning your feedback is enough for me that - if I understood you correctly - it is possible with some individualization.

I want to use this data model for different purposes. In this case, this means that on the right hand side Woocommerce products (in the graphic from the first post point 5) and an individual SEO text especially for this site (point 4) are displayed according to the site level. But it is also possible that in another case instead of the Woocommerce products suitable posts of the blog or a custom post type are shown.
In the current case, however, these are spare parts for cars. Ultimately, the goal is to have created a suitable subpage for every possible search term. No matter if someone is looking for "Audi", "Audi wheels", "A1 wheels" or "Audi A1 wheels".

The use of Woocommerce categories is unfortunately not possible. The categories in the shop differ significantly from the terms / areas mentioned. The use of a taxonomy for the manufacturer / models / areas is however possible.

The example page is about cars, yes. In our case it is especially about spare parts for cars - these would be displayed instead of the cars. The example page was only used to show the structure and the page behavior. But since we are talking about a structure that should be used on different pages with different topics, I would like to keep it as flexible as possible.

In any case, we always have the hierarchically structured main terms (point 2), the (partly also hierarchically structured) secondary terms (point 3), an SEO text matching the page and the (possibly combined) search terms (point 4) and the also matching products / posts (point 5). And the whole thing for each generated subpage until no further breakdown or combination of the terms is possible.

As already mentioned, it is important that only the areas from (2) and (3) are defined in the admin area and that the system outputs the linking and combination of the terms independently. And that the structure is broken down from general (Audi) to detailed (Audi A1 rims) in different levels / output pages. The individual SEO texts (4) should be included when creating the areas (2 & 3). The products and posts should be read out and displayed using various filters. The latter ideally has a standard filter that can be adjusted for each area and with the possibility to adjust it again individually for the respective subpage in the admin area.

I know the whole thing is a bit complicated to explain and understand. Please just ask me if it is not clear yet.

Thanks a lot already and best regards
Ben

#1734985

Hello Ben, and thank you for your feedback. I'll try to comment on some of your points below and hopefully, this will help you implement your use cases.

The topic with the URL structure I have to look at in detail. This seems to go a little deeper into the matter. For the beginning your feedback is enough for me that - if I understood you correctly - it is possible with some individualization.
Indeed, with some custom code, you may get to where you want with the URL structure of a WordPress installation.
Check this StackOverflow thread: https://stackoverflow.com/questions/23698827/custom-permalink-structure-custom-post-type-custom-taxonomy-post-name

But it is also possible that in another case instead of the Woocommerce products suitable posts of the blog or a custom post type are shown.
Using Archive templates, you will need to use taxonomies, as it is the only way to have an archive page, let us say, for "Audi", and display both, posts and products. On the other hand, the archive page for products will not display blog posts.
Using regular view, this can be done in most cases. A view can query several custom post types at once.
- https://toolset.com/glossary/archive/
- https://toolset.com/glossary/view/

You may also use a mix of custom taxonomies and relationships between custom post types. But you will need to be aware that views or archive templates are, currently, filtered with ONLY ONE relationship. They can be filtered with more, but it will need additional custom coding.
To use several filters, I'll suggest using custom taxonomies and custom fields. Queries on custom fields may have a performance effect on the speed of the page. Custom taxonomies are better suited for this.

If you implemented your data model(points 2 & 3), or more precisely, filtering on the different aspect of the data model(manufacturer, model, etc...) with custom taxonomies, or with custom posts with relationships, you will be able to add a description. You will use that for the SEO centered text that you need to have(4).

Finally, I need to add, that the filtering of views or archive template will add URL parameters to the page URL, if used without AJAX.

This being said, I wonder if these pieces of information were enough to help you understand how Toolset works. Let me know if you have any questions, or if you want to discuss a specific point.

#1740389

Hi, Jamal,

thank you for your feedback.
In principle, all this helps me already in detail, but I still don't know how to implement it best. I would suggest that I simply set up a test - but that's exactly the point I'm a bit hung up on.

If I have understood you correctly, I will start by creating the custom, hierarchical taxonomies.
That is, a taxonomy for the manufacturers (Audi, BMW, Mercedes-Benz, etc.) including the models (A1, A3, A4, etc.).
And a separate taxonomy for the areas (tires, rims, engine parts, etc.).

These taxonomies I then display on a separate archive page.

How do I output and link the taxonomies as shown on the example page?

#1740395

On the archive template, you can add the missing filters. So, you will have two different archive templates:
- One for the taxonomy "Manufacturers", in this template, include a filter for the taxonomy areas.
- One template for the taxonomy Areas, add on it a filter for the "Manufacturers" taxonomy.
Check the "Add a custom search to an archive" section in this tutorial https://toolset.com/course-lesson/creating-a-custom-archive-page/

#1749323

Hey Jamal,

I'm sorry but I still need further assistance. I Just don't get it to work.

It already fails because of the basic understanding of how the whole thing has to be built up.
Why do I have 2 archive pages if I want to have both taxonomy listings on one page?

I have now set up a test page and installed Woocommerce there. Additionally I have created a hierarchical taxonomy "cars".

Afterwards I wanted to create an archive page for the taxonomy "Cars". Here it already fails because I don't get the list of the taxonomy displayed. How does this work? How do I get a list of taxonomy terms?

#1756053

Hello,

Please allow me temporary access to your website and let me check this closely. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

If you can't share your website credentials, I can create a new installation on our platform and we'll work on it until we got a solution then you can apply it on your site. Let me know if you would prefer that.

#1760065

The archive template was configured to display the terms of each posts inside the loop, I changed it to display a link to each post.
Then I added a view to display the child terms of the current archive term.

Because, we can't create taxonomy views in the blocks editor right now, I created a new view with the legacy editor and configured it to display the child terms, the view is hidden link

Then I added the view to the archive template using a "Fields & Text" block. Check these screenshot hidden link

I hope this is what you are trying to build. Let me know if I missed something, or if you have any questions.

#1784593

Hello Jamal,

please excuse my long absence. I was on vacation and immediately afterwards I had a few projects that could not be postponed. I hope that's ok if we dig out the topic after the long time.

Thanks for your help so far.
But we are not quite at the point I wanted to reach yet.

Currently we have the taxonomy terms "Auto" in the green area.
Below that we have listed the matching products.

For the data output I would like to create, it has to be as follows:
1. output of the Taxonomy Terms "Auto" in the green area (we did - so far so good).
2. output of a second, own taxonomy "topic". Here you should output all areas that can cover spare parts. These are basic areas that every vehicle has. Body kit, tires, radiator grill, spoiler, engine.
3rd output of the products on the right of the two taxonomy areas (1. & 2. ). We have done that as well (only under the Taxonomy Terms in the green area).

If the user clicks on an "Auto" term, he should simply go down the level in the respective hierarchy tree.
So from "Audi A5" to (for example) "Audi A5 55 TFSI ".
Within this hierarchical level of the taxonomy term "Audi A5 55 TFSI" the taxonomy terms "Topic" should have been changed to "Audi A5 55 TFSI Body Kit", "Audi A5 55 TFSI Tires", "Audi A5 55 TFSI Radiator Grill" and so on.

Do you understand what I mean?
The terms from Taxonomy 1 ("Auto") and Taxonomy 2 ("Topic") should always be combined with each other at the lower level and should guide the user further.

If you get the following list

Taxonomy 1:
Audi A3
Audi A5

Taxonomy 2:
engine parts
Rims

------ and you click on Audi A5, then you get: ------

Taxonomy 1:
Audi A5 45TFSI
Audi A5 55 TFSI

Taxonomy 2:
Audi A5 Engine Parts
Audi A5 Rims

------ you click here on Audi A5 55 TFSI, then you get: ------

Taxonomy 1:
Audi A5 55 TFSI (only this one left, because it is the last level)

Taxonomy 2:
Audi A5 55 TFSI Engine Parts
Audi A5 55 TFSI Rims

------ or, if you clicked on Audi A5 Rims instead of Audi A5 55 TFSI, you will get: ------

Taxonomy 1:
Audi A5 45TFSI
Audi A5 55 TFSI

Taxonomy 2:
Audi A5 Engine Parts
Audi A5 Rims

Please let me know if a point is not quite clear. I will try to describe it as good as possible.