Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Can I limit the Amount of Tags shown on my Grav Site?

Solved by Pedro M View solution

Started by Kai 2 years ago · 6 replies · 204 views
2 years ago

I love Tags for Blog-Posts and use them a lot. But I experience the Issue when my page is floated by Tags on the right Side:

image|467x500

Theme is Open Quark Publishing.

Can I tell Grav/the Theme/the Taxonomy-Plugin that I only want X Tags there?
Are all of the Tags that I have created shown there?

2 years ago

And for Popular Tags I would expect the most used Tags and then only X of them. Like 10 or 20. But not all of the available ones 😃

2 years ago Solution

In quark/templates/partials/taxonomylist.html.twig change this line:

TWIG
{% for tax,value in taxlist[taxonomy]|slice(0,10) %}

Change the 10 to the number of tags you want to display.

2 years ago

@pmoreno:
quark/templates/partials/taxonomylist.html.twig

Just that this will be overwritten on Quark theme update

2 years ago

I have inherited my used Theme now and will change it in the copied Twig-Template. That should solve it right?

👍 1
2 years ago

You're right Karmalakas. Sometimes I forget to specify that the modifications have to be made in a child theme

last edited 01/16/25 by Pedro M
2 years ago

Okay, finally got my Child-Theme running thanks again @Karmalakas

And added the Taxonomy-Limit. Works. Thanks

Suggested topics

Topic Participants Replies Views Activity
General · by ian russell, 5 days ago
2 133 4 days ago
General · by pamtbaau, 1 month ago
2 381 2 weeks ago
General · by Hanns Mattes, 1 month ago
2 362 2 weeks ago
General · by Andy Miller, 1 month ago
0 264 1 month ago
General · by Jerry Hunt, 1 month ago
2 406 1 month ago