If you have Vanilla Cloud, custom addons will be hidden by default. This is to ensure custom addons are only visible to their respective owners.
- This functionality is defined using a theme’s addon.json.
- There are multiple methods for changing addon visibility. Later methods take precedence over earlier ones for backwards compatibility reasons.
The sites
key
📝 NOTE: This is the best method for custom client addons.
If no other methods have been used, the sites key is used. It should be set in the addon.json file.
📝 NOTE: Confused about addons and plugins? Learn the difference between Addons, Plugins, and Themes.
{
"type": "addon",
"key": "fancyaddon",
"name": "Lincoln's Fancy Addon ",
"description": "This is a fancy addon!",
"version": "1.0.0",
"mobileFriendly": true,
"authors": [
{
"name": "Your Name",
"email": "you@yourdomain.com",
"homepage": "http://yourdomain.com"
}
],
"sites": [
"mysite.vanillastaging.com",
"mysite.vanillacommunities.com"
]
}
Adding a domain to the sites
array allows a Vanilla community hosted at that domain to see your addon. These domains should be the original Vanilla domain, not a custom domain.
Site configuration option
The following method works only with theme
type addons. A theme can be shown on a specific site by using the following config key:
{
"Garden": {
"Themes": {
"Visible": "my-theme-key, my-theme-key2"
}
}
}
📝 NOTE: You can add multiple domains by separating them with a comma.
This method is discouraged.
The hidden
key
In the addon.json file, you can set the addon’s visibility with the hidden
key.
⭐️ EXAMPLE:
{
"key": "example-theme",
"name": "Example Theme",
"description": "Custom Theme Example",
"version": "2.0.0",
"type": "theme",
"license": "MIT",
"author": [
{
"name": "Adam Charron",
"email": "adam.c@vanillaforums.com"
}
],
"hidden": true
}
📝 NOTE: Core themes have their hidden
key set to false
to be visible to all clients.
Notes
- You can use an asterisk in the site name for wildcard matches (e.g., site-*.example.com). Wildcards are great for clusters that are on the Vanilla Hub.
- The key
key
works like sites
, but only takes one site as a string. This key is deprecated: use sites
instead.