Skip Navigation

[Closed] How to create a list of posts in a related taxo0nomies

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.

This topic contains 12 replies, has 2 voices.

Last updated by Christopher Amirian 4 months, 1 week ago.

Assisted by: Christopher Amirian.

Author
Posts
#2707668

How to create a list like this:

Taxonomy A
-taxonomy-b title 1
--post 1
--post 2
--post 3
-taxonomy-b title2
--post 1
--post 2
--ecc...

#2707672

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I installed the WordPress installation with Toolset which you can login using this link:

hidden link

Please create a custom post type and two taxonomies. Add a few custom post type entries and taxonomy terms and tell me how the list should show with a realistic data and I will try to create the views if it is possible.

Thank you.

#2707675

Hi, thank you.

I have done.

Well, Now for my scenario "Taxonomy A" is "Regioni" and "Taxonomy B" is "Attività svolte", and the CPT is "Portfolios"

#2707782

Hello, then, I inform you that on the site I am building, I have created a CPT that contains posts that have the same name as the terms in Taxonomy B.
That can help us to find a case solution written before?

#2707799

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I am working on this and till now created three views that show the top taxonomy, sub taxonomy and inner posts:

hidden link

But it is not correct yet, I need to kinda feed each view result with the other view.

So I am still working and I asked for a second opinion.

#2708190

Christopher Amirian
Supporter

Languages: English (English )

Ok I think I managed to implement it:

Three views:

Test 1 is a taxonomy view that lists Regione terms.

Test 2 is a taxonomy view that lists Servizio terms.

Test 3 is a post view that lists the custom post type, with a Query filter for the Servizio taxonomy and it is set to: parent Taxonomy View

Inside Test 2 view I added the shortcode below to load Test 3:

[wpv-view name="test-3"]

Inside the Test 1 view I added [wpv-view name="test-2"] to show the Test 2 view.

The final result is:

hidden link

Thanks.

#2708271

Hi, thank you.
It works but not fine. See the test page, I have added one other item and the scenario is not what I need...

#2708537

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Would you please tell me what should be the correct list with the current data? So I can know what is the issue, I am not getting what os the problem now.

Thanks.

#2708588

Well, if you see here hidden link
I have added Comune 4 with Regione 4 and Servizio C taxonomies.

If you open the page in the front end you can see that Regione 1 and Regione 2 display the same content inside, instead they could be:
Regione 1
> Servizio A
>>Comune 1
>>Comune 2
>Servizio B
>>Comune 3

Regione 2
>Servizio C
>>Comune 4

#2708747

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I see what you mean. I asked the second-tier support to see what I did wrong or even if it is possible to do so in Toolset or not.

I will get back to you as soon I have an update.

Thanks.

#2709005

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I have an answer from the second tier support. Unfortunately, it is not possible to do so as the two taxonomies are separate ones and not hierarchy ones.


Regioni and Servizio svolit are independent taxonomies, they are not in any way related to each other, and there is no hierarchy between the two taxonomies, meaning there is no sense in which Regioni are parents of Servizio, and therefore no logical way to show only Servizio that are "children" of each Regioni.

What you can do is show all Regioni, and for each Regioni show all Servizio. And for each, you can then show the posts that have that Servizio assigned. I'm guessing they would also want to limit the posts to the top-level Regioni, which is slightly trickier, but can be done by passing the Regioni via shortcode attribute so that it can be used in a Query Filter in the final level View that outputs the matching posts (along with a Query Filter for the Servizio from the parent View).

If that is what the client wants to achieve I can help with that, if needed.

Thanks.

#2709012

Hi Christopher,
thank you for your support.
Well, if I understand instead of the Regioni Taxonomy I need to create a Regioni CPT where I relate it with Relationship function to Portfolios CPT.
Is this correct?

#2709025

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

The idea would be to have one taxonomy and add it as a hierarchy mode so like categories.

Then you add entries for the first layer as the region and for the children of them as the servizio.

It is also possible to have a separate custom post type as you mentioned but I am not sure if it is possible to do the list like you have mentioned.

Thanks.

The topic ‘[Closed] How to create a list of posts in a related taxo0nomies’ is closed to new replies.