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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

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

Solved by Pedro M View solution

Started by Kai 1 year ago · 6 replies · 105 views
1 year 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?

1 year 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 😃

1 year 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.

1 year ago

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

Just that this will be overwritten on Quark theme update

1 year ago

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

👍 1
1 year 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
1 year 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 Jerry Hunt, 4 days ago
2 95 15 hours ago
General · by pamtbaau, 20 hours ago
1 61 19 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 356 5 days ago
General · by Duc , 6 days ago
3 44 6 days ago