Contents

Home › Articles

Creating Custom Widget Areas in Invision Community Themes

By Taylor Morgan · Published · Updated · 5 minutes read

Website sidebar layout showing custom widget areas on a screen mockup
Website sidebar layout showing custom widget areas on a screen mockup · Foto: doki7 / Pixabay

Invision Community ships with a fixed set of widget areas: the sidebar, the header, the footer, and a handful of block containers on key pages. They cover the common cases, but most communities eventually need a slot the stock theme doesn't offer, such as a promo band under the navigation, a second sidebar on forum indexes, or a full-width strip above the footer on the home page.

Adding one is a theme-level job, not a plugin job. You register the area in the theme's template files, place a key in the correct HTML, and then the block manager in the Admin CP picks it up so staff can drag blocks into it like any built-in region. This guide walks through that process end to end, with the pitfalls that cost the most time.

How Widget Areas Work in an Invision Theme

Every widget area in an Invision Community theme is defined by a template key, typically an extension of the core block container templates. The theme stores these under the blocks templates directory, and the system reads them when the block manager builds its list of available areas. If a key is missing or malformed, the area simply does not appear in the Admin CP, and no amount of block configuration will fix it.

The key must follow the naming pattern the platform expects, usually prefixed with the theme or app identifier, so it cannot collide with core keys. Once registered, the area behaves like any native region: it has a name shown in the block manager, a position in the template where the blocks render, and a per-area setting for how many blocks can display. Keep names descriptive, because whoever manages blocks later will see only the label, not the template file.

  • Areas are template keys, not database records
  • Names in the Admin CP come from the template key label
  • Each area can cap the number of visible blocks
  • Removing a key orphans any blocks assigned to it
2Static HTML5Links list45Recent topics60Leaderboard25Online users
Typical added render time per widget area by block type (milliseconds)

Registering a New Area in the Theme

Start in the theme editor under the blocks templates. Duplicate an existing container template, rename the key to something unique such as custom_promoArea, and clear any sample markup inside it. The container template itself should render only the block output loop plus the wrapper element you want around it, so styling stays predictable. Do not add business logic here; the template's job is placement, not decision-making.

Next, add the area to the block manager registry by editing the theme's block manager configuration template if your theme overrides it, or by relying on the platform's automatic discovery in newer 4.x releases. On versions where discovery is automatic, clearing the system caches under Support in the Admin CP is enough to make the new key appear. On older versions, you must explicitly list the key in the configuration template or it will never surface.

Make this change in a child theme rather than the parent. That way the parent can receive updates without losing your key, and if the area misbehaves you can revert by disabling the child. If you have not set one up yet, this walkthrough on creating a child theme in Invision Community covers the file structure and inheritance rules.

Widget area placement trade-offs by template location
LocationPages affectedTypical block countPerformance riskBest use
Global headerAll pages1-2HighSitewide promo or announcement
Home page bodyHome only2-4MediumFeatured content strips
Forum indexForum list1-3MediumGuidelines, top contributors
Topic view sidebarEvery topic2-3HighRelated topics, ads
Global footerAll pages1-2LowLinks, partner logos
Profile pageMember profiles1-2LowMember stats, badges

Placing the Area in Your Templates

Registration only makes the area available; placement makes it visible. Insert the block container tag into the template where you want output, for example the global header template for a sitewide promo band or the forum index template for a context-specific slot. Use the standard block output syntax with your key, and wrap it in a div with a stable class so you can style and target it later without touching the template again.

Wrap the output in a conditional check so an empty area renders nothing. Without that check, an unassigned area can leave empty padding or a stray border on every page. The pattern is a simple if-check on whether the area has blocks, then the wrapper, then the output tag. This one habit prevents most of the layout complaints that follow a widget area rollout.

Order matters. Place the area after the main content container in the DOM but position it visually with CSS if needed. Placing it before the content can push the main column down on mobile and hurt your Core Web Vitals, particularly Largest Contentful Paint. If you are also tightening layout for small screens, the guide to making your Invision theme mobile-friendly covers the container and breakpoint basics.

Assigning Blocks in the Admin CP

Once the template change is saved and caches are cleared, go to the block manager in the Admin CP. Your new area should appear in the list of available containers alongside the stock regions. Blocks are assigned per area, and the manager shows which blocks are enabled, their order, and whether they are visible to guests, members, or specific groups. Drag to reorder; the order in the manager is the order on the page.

Two settings cause most confusion. First, visibility: a block set to members only will render nothing for guests, which looks like a broken area in incognito. Second, caching: blocks with heavy queries, such as recent topics or leaderboards, are cached per area, so a block moved to a new area may show stale content for a few minutes. If a block refuses to appear, check permissions, then the cache, then the template key spelling, in that order.

For content teams, document which area is intended for what. A promo band that suddenly fills with a leaderboard block is almost always a permissions or naming mix-up, not a bug.

Performance, Caching, and Upgrade Safety

Each widget area adds render time, and blocks are not free. A recent topics block on a large forum can run a non-trivial query, and three or four such blocks in a new area will show up in Time to First Byte during peak hours. Cap the number of blocks per area, prefer cached blocks over live queries, and avoid placing query-heavy areas on templates that load on every page, such as the global header.

Keep a short changelog of the template keys you add and the files you edit. When a new Invision Community version ships, template changes can conflict, and a missing key silently removes the area from the manager while leaving blocks assigned to a region that no longer renders. Running through the theme update checklist for new versions before every upgrade catches exactly this class of problem.

If you are weighing whether to build these areas in-house or hand them off, the scope is small enough that cost is predictable; the breakdown of custom Invision theme costs gives realistic ranges for this kind of template work. For broader tuning, performance optimization best practices for Invision themes pairs well with a widget area audit.

Testing Before You Ship

Test the area in four states: unassigned, assigned with one block, assigned with several blocks, and assigned with a members-only block while browsing as a guest. Each state exposes a different failure mode, from empty wrappers to permission leaks. Check the page at 360px, 768px, and 1440px widths, because a full-width strip that looks fine on desktop often collapses awkwardly on phones.

Finally, verify the area survives a cache rebuild and a theme recache from the Admin CP. If it disappears after a recache, the key is not registered where the platform expects it, and you are relying on a stale cache rather than a real configuration. Fix it before launch, not after the first upgrade.

  • Test guest, member, and admin views
  • Check unassigned and overfilled states
  • Verify layout at three breakpoints
  • Recache and confirm the area persists
  • Widget areas are template keys; if the key is wrong, the area never appears in the block manager.
  • Always gate output on whether the area has blocks so empty regions render nothing.
  • Build areas in a child theme to keep parent updates clean and reversible.
  • Cap blocks per area and avoid query-heavy blocks on templates that load sitewide.
Taylor Morgan · Community Manager
Taylor manages online communities and has firsthand experience selecting and maintaining Invision themes. Taylor shares insights on user experience, accessibility, and getting the most out of community software. Their articles focus on practical, budget-friendly solutions.

Related

↑