Skip Navigation

[Resolved] Nested views different styling

This support ticket is created 3 years, 6 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
- 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)

This topic contains 6 replies, has 2 voices.

Last updated by stewartE 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2054123
New Mockup.png

Hi, hoping you can help 🙂

I have 3 document types

- Podcasts
- Videos
- Documents

I also have a custom taxonomy called Topics which can be applied to all three Content Types.

- Topic A
- Topic B
- Topic C

My requirement is to build a view that shows, for example, all documents types (so Podcasts, Videos and Docs) that have the category Topic A. This should be relatively straightforward. The tricky bit is...

1) The Document Types should be separated out so that each has its own row(s). Row 1 should show all Documents tagged as Topic A, Row 2 should show all Webinars tagged as Topic A, Row 3 should show all Videos tagged as Topic A (see screenshot)

2) The main next problem is that each Document type within its row has its own unique styling, display different custom fields and even different numbers of columns (see screenshot). Is this even possible!!!

3) The view needs to searchable (text search)

4) Pagination - So for example on the screenshot the Podcasts view is limited to 2 Posts. If there are more than two posts it should be paginated (is that possible or does the whole page have to be paginated????)

Note I am using legacy views.

#2054323

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Thank you for getting in touch.

Based on what you're trying to achieve, you won't be able to do this with a single view, your requirement for each post type is vastly different and can't be implemented in a single view.

You will need to create 1 view for each of your Post types and then customize the display based on the post type itself.

3) The view needs to searchable (text search)

Is it that you want to filter all 3 views or all 3 post type based on a single text search ?

4) Pagination - So for example on the screenshot the Podcasts view is limited to 2 Posts. If there are more than two posts it should be paginated (is that possible or does the whole page have to be paginated????)

This will also need to be achieved by multiple views as well, 1 view per post type and you can customize the pagination requirements accordingly.

Thanks,
Shane

#2054331
after-search.png

Hi Thanks, Shanes that's what is suspected (I just wasn't sure if there was some way to do it through the loop)

So... If I create 3 separate views 1 for each post type (podcasts, videos, docs) and filter each view to only show Topic A. Then would I embed them in a page or a content template?

Then yes I want to filter all 3 views or all 3 post type based on a single text search. I.e one search box at the top of the page which filters all the views. If you look at the first screenshot I sent that would be before search and then the second attached screenshot would be what I am trying to achieve after the user hits search

Thanks!

#2054471

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

It will be possible to do with all 3 views if you add the text search to each of the view and then remove it from the bottom 2 views.

What this will do is add the query filter to the view for the text search so when the search is triggered from the first view it will also filter the 2 other views.

The only catch to this is that you will need to use a full page refresh as this method won't work for AJAX refresh.

Thanks,
shane

#2055269
Capture.PNG

Thanks, Shane! - Just one last question.

When you say...

"if you add the text search to each of the view and then remove it from the bottom 2 views."

I have interpreted this as I need to create the search in all three views and then delete in the bottom 2 views. Just to check by remove do you mean delete from the Search and Pagination box (see screenshot showing where I have deleted it) and when I do that a message pops up asking if I want to keep or remove from the query filtering. Which option should I choose? Thanks!

#2055387

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

You're doing it correct thus far.

When you get the prompt to remove the filter from the 2 other views select no as this is needed to ensure that the search bar also filters these 2 views.

Without the actual query filter then the views won't get filtered.

Thanks,
Shane

#2057755

My issue is resolved now. Thank you!