Skip to content

How do I access just the categories of a post? #2291

Answered by cfjedimaster
arpeasal asked this question in Q&A
Discussion options

You must be logged in to vote

Given that you have a format of /categories/NAME, you can output it like so:

<a href="/categories{{cat | slug}}">{{ cat }}</a>

This will slugify the category name (ie, "cool cats" to "cool+cats", or some such, it may be "cool-cats") creating a URL safe version of the category name.

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@arpeasal
Comment options

@cfjedimaster
Comment options

@arpeasal
Comment options

Comment options

You must be logged in to vote
4 replies
@pdehaan
Comment options

pdehaan Mar 27, 2022
Collaborator

@cfjedimaster
Comment options

@arpeasal
Comment options

@arpeasal
Comment options

Comment options

You must be logged in to vote
2 replies
@arpeasal
Comment options

@cfjedimaster
Comment options

Answer selected by arpeasal
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants