Sign in

How to add custom tag template?

  • This topic has 3 replies, 2 voices, and was last updated 5 months, 2 weeks ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8980
    Avatar photocandidexmedia

    Hi!

    In the Tags section, there’s an option under “Other options” to select a Custom template. It’s currently greyed out and says “not available in your theme”. How do I create them? I’m already familiar with creating custom post templates, but couldn’t find much documentation for tags.

    #8981
    Avatar photocandidexmedia
    #8982
    Avatar photoshaun2k

    Hi Candide,

    I found these in the old “Starter” theme (https://github.com/GetPublii/theme-Starter) where you can declare custom tag and author templates in the config.json file.

    "authorTemplates": {
        "alternative": "1 column layout"
    },
    "tagTemplates": {
        "alternative": "1 column layout"
    },

    Then create the respective author-alternative.hbs and tag-alternative.hbs files.

    Edit: I just searched the Developer Documentation and see it being mentioned. 🙂
    https://getpublii.com/dev/how-to-create-custom-templates/

    #8983
    Avatar photocandidexmedia

    Thanks shaun2k! This is exactly what I was looking for.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.