Skip Navigation

[Closed] I need help about my listing template view

This support ticket is created 4 years, 5 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 9 replies, has 3 voices.

Last updated by Jamal 4 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#1748957

I have created two post types (brands and section) every brand belong to some of the sections, and every brand has different snippets for every section which belongs. How can i display the different snippets for the brands depending from the sections. I have made template for the listing of the brands for every section but i can't solve the problem with displaying the snippets in the view for the section posts.

#1753501

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where you want to display the related post information and share what is your expected results.

Once I review your post-relationship structure and see where exactly you want to display the results I will be able to guide you in the right direciton.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1759031

Minesh
Supporter

Languages: English (English )

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

As I understand - you want to display different text message as you shared with the following screenshot based on the Country (UK, Canada etc..etc..)
=> hidden link

Toolset offers [wpv-conditional] shortcode as well as conditional block to display content conditionally.
=> https://toolset.com/course-lesson/using-toolset-conditional-block/
=> https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/

Do you have a way to identify how to know the current page is loading for UK or Canada?

#1762425

Basically that is what I need. So far I managed to show ALL the snippets for specific brand using a VIEW and adding a specific filter for the section relationship that I need but that's not solving my problem. I still need to filter the snippets according the specific section page and index page.
=> hidden link

I also tried with conditional block and adding more filters to the View but the outcome was null.
The snippets are in a repeatable group that contains field Snippet Section (only a field with no relationship with the actual custom post type Sections) and field Snippet Description. You have access to the site so you can see how I did the custom field structure and the custom post types.
=> hidden link

So the main issue here is that I can't filter the view that displays the snippets so that it'll show the specific snippet for the specific section and the index page. Can you explain (show) how to connect the custom post type Sections with the repeatable group that is used for creating Snippets for Brands (if that is even possible)?

#1763229

Hello, as Minesh is on vacation, I'll continue with you on this ticket. I hope that's fine.
Unfortunately, I feel, that I do not understand what you try to do. Here below what I gathered so far:
- Brands and Sections are custom post types connected with a Many-to-many relationship.
- Snippets are a repeatable group on the Brands custom post type.
You have mentioned taxonomies, but I am not sure what taxonomies are involved? You currently have only the default taxonomies. Check this screenshot hidden link

Can you elaborate on this I can't filter the view that displays the snippets so that it'll show the specific snippet for the specific section and the index page.

I understood that you want to display, on a section page, the snippets of the related brands(to the current section), right?

#1763231

Hello, as Minesh is on vacation, I'll continue with you on this ticket. I hope that's fine.
Unfortunately, I feel, that I do not understand what you try to do. Here below what I gathered so far:
- Brands and Sections are custom post types connected with a Many-to-many relationship.
- Snippets are a repeatable group on the Brands custom post type.
You have mentioned taxonomies, but I am not sure what taxonomies are involved? You currently have only the default taxonomies. Check this screenshot hidden link

Can you elaborate on this I can't filter the view that displays the snippets so that it'll show the specific snippet for the specific section and the index page.

I understood that you want to display, on a section page, the snippets of the related brands(to the current section), right?

#1763329

Hello Jamal.
Yes, you understood correctly, that is exactly what I'm trying to display - on a section page, the snippets of the related brands(to the current section).

So far, as you already saw on the screenshots, I've achieved to display all of the snippets for a specific brand creating a template using the VIEW from the Toolset tools that is filtered like => hidden link

As for the taxonomies, I don't use none of them and I didn't create any, because I don't think I need them.

#1763423

Thank you for your feedback. To be able to display that, we'll need to nest views, but currently, the blocks editor does not support nested views yet.
So, we'll need to activate the legacy editor too and create the child/nested view there, then we'll add it inside of the loop of the parent/first view.

Before going further, it is worth mentioning the difference between a content template and a view. A content template is meant to display one post. A view is meant to display a list of posts. Check our glossary for more details. https://toolset.com/glossary/

You are currently, trying to display this inside of the homepage, so, you will need another level(parent) of views, this will go like this:
- The homepage will contain a view to display "Sections" unless you want to display only one section.
- This view's loop will contain a view to display "Brands" related to the current post in the loop.
- This view's loop will contain a view to display the snippets.

Let's first display the snippets inside a section page, this will involve the following:
- Content template to display the section.
- A view inside of it to display the related Brands.
- Another view(nested) to display the snippets.

First, we need to activate the legacy editor to be able to create the nested view, check this screenshot hidden link

Then, I have created a content template, that is not assigned to any content type, but I'll use it on a section for demonstration. hidden link
Inside of this content template, I created a view to display the related brands to the current section. Check this screenshot hidden link
The content template is: hidden link

Then, I went to Toolset->Views to create the nested view to display snippets. Check this screenshot hidden link
The view is: hidden link

Then, I put this view inside of the loop of the parent view, check this result hidden link
You can check it live here hidden link

Now, If you want to do the same inside the homepage for all the section, you will need to create a view to display the sections, and nest inside of it a view of related Brands, but this time the filter should be related to the current post in the loop.

I hope this makes sense. Let me know if you have any questions.

#1764243

Okay, so what you did here I've already done it.

What I need from here is to be shown only one specific snippet for the specific brand in the specific section, not all of the snippets for the specific brand.
=> hidden link
=> hidden link
As you can see on the screenshots, is the same brand but in different sections with different snippet.

Is it possible to make some kind of connection between the Repeatable Field for snippets and the Sections?

#1764407

Is it possible to make some kind of connection between the Repeatable Field for snippets and the Sections?
I do not think this is possible. Repeatable Fields are a hidden custom post type, and they are not meant to be linked to other custom post types.

What I need from here is to be shown only one specific snippet for the specific brand in the specific section, not all of the snippets for the specific brand.
Can you elaborate on the logic that will rule this? What specific snippet? For what specific brand? For what specific section?

The topic ‘[Closed] I need help about my listing template view’ is closed to new replies.