Skip to content

How to display tags/categories above blog posts #1519

Closed Answered by gabriel-berardi
gabriel-berardi asked this question in Q&A
Discussion options

You must be logged in to vote

Actually just figured out how to achieve this - posting here in case anyone comes across this in the future.

The approach above does not work because the code references variables that are not available on the blog page.

I added the following code to lists.html:

{{/* Add the tags above list of blog posts */}}
<h2>Categories</h2>
<br/>
<ul class="terms-tags">
  <li>
    <a href="/blog/">All Articles<sup><strong><sup></sup></strong></sup> </a>
</li>
  <li>
      <a href="/categories/data-analytics/">Data Analytics <sup><strong><sup></sup></strong></sup> </a>
  </li>
  <li>
    <a href="/categories/another-category/">Another Category <sup><strong><sup></sup></strong></sup> </a>
</li>
</ul>
<br

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gabriel-berardi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant