---
title: "How To Add Global Style to a WordPress Block?"
url: https://nexterwp.com/docs/add-global-style-to-a-wordpress-block/
date: 2025-04-17
modified: 2026-09-28
lang: en
author: "Aditya Sharma"
description: "Styling a card once is quick. Styling the same card on nine pages, then changing the brand colour, is where the afternoon goes. A global style saves the styling under..."
image: https://nexterwp.com/wp-content/uploads/2025/04/add-global-style-to-a-wordpress-block-1024x519.jpg
word_count: 510
---

# How To Add Global Style to a WordPress Block?

## Key Takeaways

- Nexter Blocks guarda un estilo global bajo un nombre y, al editarlo una vez, actualiza todos los bloques que usan ese nombre.
- Un bloque con estilo global renderiza una clase compartida, como tpgb-block-mystyle1, además de su clase de instancia, como tpgb-block-90860d61.
- Los estilos guardados son por tipo de bloque y siguen funcionando en Nexter Blocks Pro desactivado, porque forman parte del plugin gratuito.

Styling a card once is quick. Styling the same card on nine pages, then changing the brand colour, is where the afternoon goes.

A global style saves the styling under a name. Every block using that name picks it up, and editing it once updates all of them.

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/extras/wordpress-global-block-style/)

## Before You Start

- **Edition:** Free — works in Nexter Blocks (free) and with Nexter Blocks Pro.- **Block to enable:** any Nexter block, switched on under **Nexter > Blocks** in your WordPress dashboard.- A block you have already styled the way you want it.

## Steps

- Style one block exactly as you want it.

![Styling the first block](https://nexterwp.com/wp-content/uploads/2025/04/global-block-style-activate-new-1.webp)

- Open its **global style** option and save the style under a name.

![Saving the style as a global style](https://nexterwp.com/wp-content/uploads/2026/08/global-block-style-edit-icon-v1.webp)

- Give it a name you will recognise later, such as `card-primary`.

![Naming the global style](https://nexterwp.com/wp-content/uploads/2026/08/global-block-style-set-default-v1.webp)

- Select another block of the same type and apply the saved style.

![Applying the saved style to another block](https://nexterwp.com/wp-content/uploads/2026/08/global-block-style-default-confirm-v1.webp)

- Change the saved style once and check every block using it updates.

![Editing the saved style](https://nexterwp.com/wp-content/uploads/2026/08/global-block-style-default-active-v1.webp)

- Publish and check the real page.

![The published result](https://nexterwp.com/wp-content/uploads/2026/08/global-block-style-remove-style-dialog-v1.webp)

![Blocks sharing one global style](https://nexterwp.com/wp-content/uploads/2025/04/Screenshot-2026-08-19-130402.webp)

## How It Behaves

The saved style is a shared CSS class, added to every block that uses it.

- **Measured on a published page:** a block with a global style named `mystyle1` rendered `tpgb-block-mystyle1` *in addition to* its own instance class, for example `tpgb-block-90860d61`. Without the global style, only the instance class was present.- **That is the whole mechanism.** The shared class carries the saved styling; the instance class carries anything specific to that one block.- **One change updates every block using the name**, because they all point at the same class.- **Per-block overrides still apply**, since the instance class is still there — which is why a block can use a global style and still differ slightly.- Measured with Nexter Blocks Pro deactivated: this still works. It is part of the free plugin.

## Limitations

- **Name them for their purpose, not their appearance.** `card-primary` survives a rebrand; `blue-card` becomes a lie the first time it turns green.- **Editing a global style changes every page using it**, including pages you have forgotten about. That is the point, and it is also the risk.- **Styles are per block type.** A saved heading style is not available on a button.- **Deleting a style leaves the blocks that used it** without that styling, so check what is using a name before removing it.- **A long list of near-identical styles is worse than none.** Keep the set small enough to remember.

## Troubleshooting

### The saved style is not in the list

Saved styles are per block type. Check you are looking at a block of the same type as the one you saved it from.

### Applying it changed nothing

The block probably has its own overrides set, and those win. Clear the block's individual styling first.

### Changing one block changed several

You edited the global style rather than that block. Measured, every block using the name carries the same shared class, so they all follow.

### I cannot tell which blocks use a style

There is no usage list. Search the published page source for the shared class — measured, it renders as `tpgb-block-<your-name>`.

## Related Docs

- [Add dynamic content in WordPress](https://nexterwp.com/docs/how-to-add-dynamic-content-in-wordpress/)- [Add copy paste styles in WordPress](https://nexterwp.com/docs/add-copy-paste-styles-in-wordpress/)- [Add a container in WordPress](https://nexterwp.com/docs/add-a-container-in-wordpress/)- [Advanced tab settings](https://nexterwp.com/docs/use-advanced-tab-in-nexter-blocks/)

## Frequently Asked Questions

**Q: What do I need before adding a global style to a WordPress block?**
A: A global style in Nexter Blocks starts with a block you have already styled the way you want it. The feature works in the free edition and also with Nexter Blocks Pro, but the block itself must be enabled under Nexter &gt; Blocks in your WordPress dashboard. That setup matters because the saved style is tied to a specific block type, so starting from the right block avoids mismatches later.

**Q: Why did my saved style not show up on another block?**
A: Saved styles are per block type, so a style created on one kind of block will only appear on the same kind of block. That is why a heading style will not show up on a button. In Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter, the shared style name only becomes available where the block type matches.

**Q: Why did changing a global style update several blocks at once?**
A: That is how the shared class works. A saved global style is added as a shared CSS class to every block using that name, so editing it once updates all of them. On a published page, measured output showed a class like tpgb-block-mystyle1 alongside the block’s own instance class. The shared class carries the global styling, while the instance class keeps block-specific differences.

**Q: How do I tell which blocks are using the same global style?**
A: There is no usage list in the interface. The practical way is to search the published page source for the shared class name, which measured as tpgb-block-. That matters because every block using that name carries the same shared class. If you are cleaning up styles or planning a rename, checking source first helps avoid breaking pages you forgot about.

**Q: What is the best way to name a global style in WordPress?**
A: Name it for its purpose, not its appearance. A label like card-primary stays useful even if the card changes color later, while blue-card becomes misleading as soon as it turns green. That naming habit matters because editing one global style affects every page that uses it. Keeping names tied to function also makes long-term maintenance much easier.

**Q: Does adding a global style replace other styling on that block?**
A: No. The instance class still stays on the block, so per-block overrides can still apply alongside the shared global style. That means one block can use the same saved style and still differ slightly from another block using that same name. If applying a saved style seems to do nothing, clear the block’s individual styling first because those overrides win.
