Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Edit a Button in WordPress (Step by Step)

How to Edit a Button in WordPress (Step by Step)

Short answer

Click the button in the block editor and type new text on the canvas. Use the link icon in the toolbar to change its URL, then open the Styles tab in the sidebar to change colours, typography, padding and border radius before you save.

Key takeaways

  • Most buttons are Button blocks edited in the block editor.
  • The toolbar link icon changes the URL; the sidebar changes the look.
  • Global styles in the Site Editor change every button at once.
  • Header buttons live in template parts or the Customizer.
  • Elementor buttons use the widget's Content and Style tabs.

How do you edit a button in WordPress?

Select the button in the editor, then change its text on the canvas, its link from the toolbar and its colours, size and shape from the settings sidebar.

Where you click depends on how the button was made. Most buttons today are Button blocks in the block editor, but some come from Elementor, a theme header or a plugin such as a form or WooCommerce.

Find out which one you are dealing with first. Hover over the button in the editor: a block toolbar means a Button block, a blue widget frame means Elementor, and no response usually means the theme or a plugin outputs it.

Where the button livesWhere you edit it
Post or page contentBlock editor, Button block settings
Header, footer or templateSite Editor (block themes) or Customizer (classic themes)
Elementor pageElementor Button widget, Content and Style tabs
Form submit buttonThe form plugin's settings
Shop buttonsWooCommerce, theme or custom CSS

If you have not added the button yet, start with our guide on how to create a button in WordPress, then come back here to style it.

Step 1: Change the button text

Click directly on the button label in the block editor and type the new text, just as you would edit a paragraph.

Keep labels short and specific. Download the checklist tells visitors more than Click here, and it reads better for screen reader users who jump between links.

Press Escape when you finish to leave text editing and select the whole block. That lets you reach the toolbar and sidebar settings for the next steps.

A Button block always sits inside a parent Buttons block. Clicking once selects the single button; the Select parent icon in the toolbar selects the group, where you change alignment and spacing between several buttons.

Select the button and click the link icon in the toolbar, or press Ctrl+K (Cmd+K on a Mac), then paste a new URL or search for a page on your site.

Type part of a page or post title and WordPress suggests matching content. Picking from the list avoids typos in internal URLs.

Toggle Open in new tab only when leaving the page would interrupt the visitor, such as a PDF download or an outside tool. For pages on your own site, the same tab is usually better.

To link to an email address, start the URL with mailto: followed by the address. Our guide on how to make an email link in WordPress covers subject lines and spam protection too.

The official Buttons block documentation on WordPress.org shows the same toolbar options with screenshots.

Step 3: Change the button colour and style

Open the settings sidebar, switch to the Styles tab and use the Color panel to change the text and background colours.

WordPress offers two built-in styles: Fill, a solid background, and Outline, a border with a transparent middle. Your theme may add more styles in the same panel.

The Color panel shows your theme palette first. Choosing palette colours keeps buttons on brand, and they update automatically if the palette changes later.

Many themes also offer gradients for the background. Use them sparingly; plain colours usually look cleaner and keep text easier to read.

Check contrast between text and background. The WCAG contrast guidance asks for a ratio of at least 4.5 to 1 for normal text, which rules out pale text on bright buttons.

Step 4: Change size, padding, shape and width

Use the Typography, Dimensions and Border panels in the Styles tab to change font size, padding and corner radius, and the Settings tab to set button width.

Typography changes font size, weight and letter case. Some themes hide parts of this panel until you click the three-dot menu on the panel header and turn the option on.

Dimensions sets padding, the space between the label and the button edge. More padding makes a bigger, easier-to-tap button on phones.

Border controls the radius, width and colour. A radius of zero gives square corners; a large value gives a pill shape.

Width lets you set the button to 25, 50, 75 or 100 percent of its container. Full width works well on narrow mobile layouts and sign-up forms.

The developer reference for the core Button block lists which design supports the block offers, if you want to see everything available.

How do you change every button on the site at once?

Edit the global button styles in the Site Editor on a block theme, or in the Customizer or theme options panel on a classic theme.

On a block theme, go to Appearance, then Editor, then Styles. Look under Blocks for the Button block, or under Elements for buttons, and change colours, typography and borders there.

Global styles apply to every button that has not been styled one by one. Buttons with their own custom colours keep them, so clear those settings if you want them to follow the new global look.

Developers can set the same defaults in code. Our guide on how to use theme.json shows where button styles live in that file.

On a classic theme, check Appearance, then Customize. Many themes have a Buttons or Colors section, but the location varies, so check your theme's documentation.

On a block theme, open the header or footer template part in the Site Editor and edit the button there like any Button block.

Go to Appearance, then Editor, then open the template or pattern that holds the header. Click the button, change the text or link, then save.

Changes to a template part apply everywhere it is used. That is usually what you want for a header button, but double-check before you save.

Our guide on how to edit the header in a block theme explains template parts in more detail.

Classic themes often place the header button in the Customizer under a header builder or header section. Some put it in Appearance, then Menus, as a menu item with a special CSS class. Our guide to changing the header in WordPress covers both layouts.

How do you edit a button in Elementor?

Open the page with Elementor, click the Button widget, then use the Content tab for text and links and the Style tab for colours, typography, border and padding.

The Content tab holds the label, link, alignment, size preset and an optional icon. The Style tab holds colours for the normal and hover states.

The Elementor Button widget guide lists every control with screenshots, and it is the best reference if your version looks different.

To change all buttons on an Elementor site, open Site Settings from the Elementor menu and look for the Buttons section. Our overview of Elementor Pro site settings explains how global styles work there.

Click Update when you finish. If the change does not appear on the live page, clear any caching plugin and your browser cache.

How do you edit a button with custom CSS?

Add a class name to the button in the Advanced panel, then target that class with CSS in the Site Editor or the Customizer's Additional CSS box.

Select the button, open the sidebar, expand Advanced and type a class such as cta-main in the Additional CSS class field. Then add rules for that class.

For example, this rule changes the hover colour of buttons with that class:

.cta-main .wp-block-button__link:hover {
  background-color: #1e3a8a;
  color: #ffffff;
}

The MDN reference for the hover pseudo-class explains how hover styles work if you want to adjust them further.

On block themes, add CSS under Styles, then the three-dot menu, then Additional CSS. On classic themes, use Appearance, then Customize, then Additional CSS.

If your CSS does nothing, the theme may use a more specific selector, or a cache may be serving old files. Our fix for CSS changes not showing walks through both causes.

What about form and shop buttons?

Form submit buttons and WooCommerce buttons are usually styled by the plugin or theme, not by the Button block.

For form plugins, open the form's settings to change the submit button text. Colours often follow your theme, and some plugins add a style panel or accept a custom CSS class.

WooCommerce buttons such as Add to cart take their style from the theme. On block themes, the global button styles in the Site Editor usually affect them too.

Changing the Add to cart text needs a theme option, a small plugin or a code filter. Test any change on a staging site first, because shop buttons affect sales.

Why won't my button changes save or show?

Most failed button edits come from caching, a reusable pattern that overrides local changes, or a theme style that beats your setting.

Clear your caching plugin, server cache and browser cache, then reload. Look at the page in a private window to rule out your own browser cache.

If the button is part of a synced pattern, edits on one page may be locked or may change every copy. Open the pattern itself to edit it, or detach it if you only want to change one page.

If none of that helps, switch to a default theme on a staging copy. If the button behaves there, your theme's CSS is the cause, and its support team can tell you the right setting.

Frequently asked questions

How do I change the colour of a button in WordPress?

Select the button, open the settings sidebar, switch to the Styles tab and use the Color panel to set text and background colours. To change every button, edit the Button block in the Site Editor's global styles instead.

How do I change a button link in WordPress?

Select the button and click the link icon in the toolbar, or press Ctrl+K or Cmd+K. Paste the new URL or search for a page, then press Enter and update the page.

Why can't I click the button in my header?

The header is a template part or a theme setting, not part of the page content. Edit it in the Site Editor on a block theme, or in the Customizer or theme options on a classic theme.

How do I make a WordPress button bigger?

Increase the font size in the Typography panel and the padding in the Dimensions panel. You can also set a width of 50, 75 or 100 percent in the button's Settings tab.

How do I change the hover colour of a button?

Block themes may offer hover colours in global styles for buttons. Otherwise, add a CSS class to the button and write a hover rule in Additional CSS. Elementor has a Hover tab in the widget's Style settings.

Sources

  1. Buttons block WordPress.org Documentation
  2. Button block reference WordPress Developer Resources
  3. Button Widget Elementor Help Center
  4. Understanding Contrast (Minimum) W3C
  5. :hover MDN Web Docs

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.