Conditional text elements for blog archive layout

I’m using the same archive layout to display date archives, categories, and tags.

I’d like to conditionally display the following text depending on the query.

  • Displaying posts for: [category]
  • Displaying posts for: [tag]
  • Displaying posts for: [archive date]

Technically all posts would have categories and tags so my solution work. Is there a way to accomplish this on the same layout using another expression? Or would I need to create variations of this layout and assign it to tags, categories, and archive pages?

Lastly, I used {{dc:term:name}} for categories/tags, but what should I use to display the archive month and year?

Thanks!

Hello @WaggingLabs,

Thanks for writing in!

Your archive conditions for the elements are only the following:

Because of that, it is best that you duplicate create variations of your layout and assign it to tags, categories, and other archive pages.

You can use the {{dc:archive:name}} to display the monthly or yearly archive.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.