Skip Navigation

[Resolved] How to display CP in a view only if they're not being displayed in anohter view

This support ticket is created 4 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 21 replies, has 2 voices.

Last updated by Dan 4 years ago.

Assisted by: Minesh.

Author
Posts
#2123247

Minesh
Supporter

Languages: English (English )

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

Its possible but then you will have to remove the limit of 50 you set with your view and set it to 'No limit'.

And then add pagination and display 20 results per page and add pagination links. As it seems you have thousands of news posts and its not recommended to display all news at once that is why you should add pagination.

#2123249

Dan

Ok, I changed it to what you recommended and I see the pagination and a 2nd page, but all posts are the ones with taxonomies and not displaying the ones without "in between" these ones and sorted by publishing date. For example, in the attached captures, those 3 articles without a taxonomy should display in between the ones with taxonomies above and below, as these are sorted by published date and no other filter.

#2123253

Dan
Screen Shot 2021-07-23 at 4.49.04 AM.png

Forgot the attachment, here goes...

#2123281

Minesh
Supporter

Languages: English (English )

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

You forget to remove the limit so I have set the limit to 'No limit' and also adjusted the pagination shortcode.

Please check now:
- hidden link

I'm not sure on what page the post where taxonomy not assigned will be not available but it will be there. If you want you should try to add text search.

#2123655

Dan

This works now. Thanks a lot for your assistance and for the code. Much appreciated.

#2123657

Dan

My issue is resolved now. Thank you Minesh!

#2125895

Dan

Hi Minesh,

Following up with this ticket I need your support again, if possible. For the same views "Top News" and "Featured News", I now need to add a second sort order. Right now it is set by publishing date and the second sort should be by the custom field "Article Placement' where Top news has its own field slug "article-placement-top-news" and Featured news with the slug "article-placement-featured-news" (both numeric fields). So I need the second sort by these fields per each view Ascending.

I believe this is done with yet more custom code (snippets) based on some other support posts I found but I'm not certain how to go about it and if this can be combined with your code snippet.

Kindly let me know.

Thanks,

Dan