> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Tag config options

- URL: https://getpublii.com/dev/tag-config-options/
- Published: 2023-04-09T09:31:04.348Z
- Updated: 2025-04-02T07:48:50.685Z
- Description: Tag config options provide a versatile way to customize tag-related content on your website. You can access these options in the right-sidebar of the Edit…
- Author: Bob Mitro
- Tags: Guides

Tag config options provide a versatile way to customize tag-related content on your website. You can access these options in the right-sidebar of the **Edit Tag** screen under the **Other Options** section.

It is important to note that these options also appear in the **Theme Settings** screen under the **Tag Options** section. The settings configured here serve as default values for all tags, which can be individually adjusted for each tag in the **Other Options** section mentioned above.

Similar to [post config options](#INTERNAL_LINK#/post/128), tag config options can be included or excluded in the **tagConfig** section of the **config.json** file.

## How to add a custom tag option?

There are several tag config options available. Let's see an example of how to add a select element to enable/disable the display of the post counter on the tag page:

```json
"tagConfig": [
        {
            "name": "displayPostCounter",
            "label": "Display post counter",
            "value": 1,
            "type": "select",
            "options": [
                {
                    "label": "Enabled",
                    "value": 1
                },
                {
                    "label": "Disabled",
                    "value": 0
                }
            ]
        }
]
```

In the code above, we:

-   Specified the **Name** of the variable using the name attribute.
-   Used the **Label** attribute to provide the option's name as it will appear in the sidebar.
-   Set the default behavior with the **Value** attribute; using 1 means that the option will be enabled by default.

-   Defined the **Type** attribute as **select** to create a select element with a drop-down list.
-   In the **Options** section, defined each option available in the drop-down list and what variables it will change.

## How to use tag config options?

To use tag config options in the **tag.hbs** file, you can use the following markup:

```handlebars
{{#if tagViewConfig.displayPostCounter}}
    <sup>({{postsNumber}})</sup>
{{/if}}
```

When you change the option to "Disabled", the post counter will not be displayed.

**Note:** all options can be used within conditions (i.e. if statements)

## Available tag config option types

The example above uses only one option type, but you can utilize various elements to expand the tag content.

The **available option types** are:

-   [text](#INTERNAL_LINK#/post/110)
-   [textarea](#INTERNAL_LINK#/post/111)
-   [select](#INTERNAL_LINK#/post/123)
-   [colorpicker](#INTERNAL_LINK#/post/113)

-   [separator](#INTERNAL_LINK#/post/119)
-   [image](#INTERNAL_LINK#/post/163)

These option types can be used similarly to the post config options, allowing you to create a customizable experience for your tag-based content. For a detailed description of each option type, please refer to the [post config options](https://getpublii.com/dev/post-config-options/#what-other-config-options-are-availablenbspbr) article.
