Skip Navigation

[Resolved] Limit the number of taxonomy records displayed

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user was displaying the taxonomies for a post but wanted to limit the number of terms being displayed.

The user was using the [wpv-post-taxonomy] to display the terms, which doesn't allow for you to limit the number of items displayed.

Solution:

So in this case you will need to create a taxonomy view to display the taxonomy terms. Initially this view will want to display every single term.

However you will need to add a query filter for taxonomy term so the taxonomy view is filtered for the current post.

Then you can set the limit for the view to display only 4 results.

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

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Mario 4 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1295185

Tell us what you are trying to do?
Limit the number of taxonomy records displayed.

I would like to display the first 4.

#1295287

Shane
Supporter

Languages: English (English )

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

Hi Mario,

When you say limit the number of taxonomies or limit the display of the first 4 could you provide a little bit more context on where you are referring to ?

Perhaps you can also provide a screenshot as well.

Thanks,
Shane

#1295307

Limit the display to the first 4.

#1295311
taxonomy-4.PNG

Image attached

#1296305

Shane
Supporter

Languages: English (English )

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

Hi Mario,

I'm assuming that you are using the [wpv-post-taxonomy] shortcode here correct?

Are you aware of how to use a view to do this ?

You can create a taxonomy view and then add a query filter to that taxonomy view for the taxonomy term. Set this filter to display the terms based on the current page.

From there you can use the limit and offset settings to just set the view to only display 4 items.

Please let me know if this helps.
Thanks,
Shane

#1296867

Hi Shane

Yes I am using [wpv-post-taxonomy type="p-service" format="name"].

It is being used within the output of a search query

#1298043

Shane
Supporter

Languages: English (English )

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

Hi Mario,

Ok so in this case you will need to create a taxonomy view to display the taxonomy terms. Initially this view will want to display every single term.

However you will need to add a query filter for taxonomy term so the taxonomy view is filtered for the current post.

Then you can set the limit for the view to display only 4 results.

Please let me know if this helps.
Thanks,
Shane

#1303061

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.