Skip to content
WordPress Support

WordPress Shortcode Not Working? Read the Symptom

Square brackets showing on a live page usually mean WordPress does not recognise the shortcode. Here is how to tell which of four problems you have.

Two people looking at a laptop together
9 sections · 8 min read
In this article · 9 sections

You open your contact page and, where the form should be, there is a line of text in square brackets: [contact-form-7 id=”123″ title=”Enquiry”]. Or the pricing table on your services page has turned into [pricing_table plan=”basic”]. Visitors can see it. Nothing is clickable. It looks like a typo someone forgot to fix.

A WordPress shortcode not working is one of the more readable faults on a site, because the symptom tells you a lot about the cause. This guide sorts the problem by what you actually see on the page, then works through the checks for each case.

How a shortcode is supposed to work

A shortcode is a placeholder. A plugin or theme tells WordPress, “when you see [this_name], run my code and put its output here.” When WordPress builds the page, it looks through the content for bracketed names it recognises and swaps each one for whatever the code returns.

The important word is recognises. If nothing has registered that name, WordPress leaves the brackets exactly as they are and prints them as ordinary text. It does not show an error, and it does not hide the tag. That one behaviour explains most cases of a shortcode showing as text.

WordPress shortcode not working? Start with what you see

Look at the page in a private browser window and match what you see to one of these:

  1. The bracketed tag appears as plain text. WordPress either does not recognise the name, or is not processing shortcodes in that spot.
  2. Nothing appears at all, not even the tag. The shortcode ran, but its output was empty.
  3. The output appears, but in the wrong place, usually at the very top of the content.
  4. The output appears but looks broken: unstyled, squashed or with buttons that do nothing.

Each one has a different set of causes, so do not skip this step.

Symptom 1: shortcode showing as text

The plugin that provides it is inactive or gone

This is the most likely cause by far. Shortcodes belong to the plugin or theme that created them. Deactivate the plugin, delete it, or switch away from the theme, and every tag it provided turns into visible text.

Check Plugins, then Installed Plugins. Is the form plugin, gallery plugin or table plugin still active? If someone recently tidied up the plugin list, or an update failed and left the plugin disabled, this is your answer. Theme shortcodes are a special trap: if you changed themes, the old theme’s buttons, columns and tabs all stop working at once.

If you do not know which plugin a tag belongs to, the name is often a clue. Searching the plugin directory for the tag name usually finds it.

The name or quotes are wrong

Shortcode names have to match exactly. [contact_form] and [contact-form] are different names. Names are also case-sensitive, so [Gallery] is not the same tag as .

Quotation marks cause a quieter version of this. If the tag was copied from a Word document, an email or some chat apps, the straight quotes around the attribute values may have turned into curly ones. The shortcode may still run but read the attribute wrongly, so the plugin cannot find form “123” because it was given a value with stray quote characters attached. Retype the quotes by hand in the editor.

The tag is inside a code block or escaped

If the shortcode was pasted into a Code or Preformatted block, WordPress is being told to show it as text, so it will. The same happens if it was wrapped in double brackets, like [gallery]. WordPress treats double brackets as a deliberate way to print a shortcode without running it, which is useful for tutorials and confusing everywhere else.

In the block editor, the safest home for a shortcode is the Shortcode block. Some page builders have their own equivalent widget. Open the page, find where the tag sits and check what kind of block or element holds it. The block editor itself can be stubborn about this; if it will not let you change a block type, our notes on block editor problems cover the usual reasons.

The location does not process shortcodes

WordPress runs shortcodes in post and page content. Not every other place that accepts text does the same. Common examples where a tag may stay as plain text:

  • Theme option fields such as header text, footer credits or top bars
  • Custom field values that the theme prints directly
  • Some widget types, depending on the widget
  • Menu item labels, post titles and excerpt fields
  • Theme template files, where a developer has typed the tag into PHP

In a template file, the tag has to be passed through WordPress’s do_shortcode function and echoed; typing the bracketed text alone just prints it. In theme option fields, whether shortcodes work depends entirely on the theme. If you need a form in a sidebar, try the Shortcode block inside a block-based widget area. The related problem of sidebar widgets that will not appear is covered separately.

Custom fields deserve a note of their own. If a developer built a template that prints a custom field and you put a shortcode in that field, the result depends on how they wrote the template. Our post on custom fields not displaying goes into how those templates usually work.

Symptom 2: the tag vanishes but nothing appears

An empty space where the shortcode was is actually good news. WordPress found the plugin and ran it. The plugin returned nothing.

Check these, in order:

  1. The ID points at something deleted. A form shortcode with id=”123″ shows nothing if form 123 was deleted or replaced by form 456 during a rebuild. Open the plugin’s own list of forms, tables or sliders and compare the IDs.
  2. The item is unpublished or set to a schedule. Some plugins hide sliders, pop-ups or events outside their date range.
  3. Visibility rules. Membership, login-only or country-based rules can hide content from visitors while you, logged in, see it fine. Test in a private window.
  4. A licence or setup step. Some premium plugins may output nothing until the licence is active or the setup wizard is finished. The plugin’s settings page usually says so.
  5. A PHP error inside the plugin. If the plugin crashes partway, it may return nothing, or the page may stop rendering below that point. Check the site’s error log for a line naming the plugin’s folder.

Symptom 3: output jumps to the top of the page

If the shortcode works but its output appears above the page’s heading or first paragraph, rather than where you placed it, the cause is almost always in the code that powers it. WordPress expects a shortcode’s code to hand its output back so it can be placed in position. Code that prints output directly instead gets displayed the moment it runs, which is before the rest of the content.

You cannot fix this from the dashboard. If it is a well-known plugin, update it and check its support forum; if it is custom code written for your site, the developer needs to change it to return its output. Write down the page address and a screenshot, because this is a quick change for whoever has access to the code.

Symptom 4: the output looks broken

The form appears but has no styling, the tabs are all open at once, or the slider shows every image stacked down the page. The shortcode ran, but the plugin’s CSS or JavaScript did not load or did not run.

  • Optimisation plugins. Combining, delaying or removing unused CSS and JavaScript is a frequent cause. Turn those options off one at a time, clearing the cache after each, and see whether the shortcode recovers.
  • JavaScript errors. Open the browser console (F12, then Console) and look for red errors. One error from another plugin can stop the scripts that make tabs or sliders work. Messages that mention jQuery are explained in our guide on jQuery errors in WordPress.
  • Conditional loading. Some plugins load their files only on pages where they detect their own shortcode. If the shortcode sits inside a page builder element or a widget, detection can fail. Many plugins have a setting to load assets on every page.

A five-minute test that settles it

When you have a WordPress shortcode not working and no clear idea why, create a new draft page. Add a Shortcode block and paste in the tag, typed fresh rather than copied. Preview the draft.

  • Works in the draft but not on the real page? The problem is the real page: the block type, a page builder element or something around the tag.
  • Shows as text in the draft too? The name is not registered. Go back to the plugin check.
  • Works in the draft only when you are logged in? Look at visibility rules or caching.

This takes less time than any other check and it changes nothing on the live page, which makes it a good first move on a site you are nervous about touching.

Prevent it next time

Before deactivating or replacing a plugin, search your content for its shortcode name. Many search-and-replace tools can search post content without changing it, and the posts list search will find many tags too. Before switching themes, list every theme-provided shortcode you use; those pages will need rebuilding with blocks or another plugin. Keep a note of which forms and tables are in use and on which pages, so an ID mismatch after a cleanup is obvious.

When to ask for help

Hand it over when the shortcode belongs to custom code nobody can explain, when dozens of pages are full of tags from a theme you no longer have, or when the fix means editing template files. A single broken shortcode is the kind of fault our wordpress bug fixing services cover, priced at ₹1,499 per incident onwards. A bigger clean-up, such as rebuilding many pages of old theme shortcodes, is looked at and quoted separately first.

Most of the time, though, those square brackets are just telling you a plugin has gone missing. Find which one, and the page usually comes back the moment it is active again.

If you cannot tell whether the fault sits in WordPress or on the server, our guide on telling a WordPress bug from a hosting problem helps you narrow it down.

Next in this series: WordPress Menu Not Showing? Check These Three Places

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.