Shortcoder — Create Shortcodes for Anything

Descripción

Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript, CSS and other code snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.

✍ Crea shortcodes fácilmente

  1. Give a name for the shortcode
  2. Pega el HTML/JavaScript/CSS como contenido del shortcode
  3. Save !
  4. Now insert the shortcode [sc name="my_shortcode"] in your post/page.
  5. Voila ! You got the HTML/Javascript/CSS in your post.

✨ Características

  • Crea shortcodes personalizados fácilmente y úsalos en cualquier parte que sea compatible con shortcodes.
  • Ten cualquier HTML, JavaScript y CSS como contenido del shortcode.
  • Insert: Custom parameters in shortcode
  • Insert: WordPress parameters in shortcode
  • Multiple editors: Code, Visual and text modes.
  • Globally disable the shortcode when not needed.
  • Desactiva el shortcode en dispositivos de escritorio y móviles.
  • Un botón en el editor de entradas para seleccionar el shortcode a insertar.
  • Execute blocks HTML in shortcode content.
  • Insert shortcodes in Gutenberg/block editor.

🎲 An example usage

  1. Create a shortcode named «adsenseAd» in the Shortcoder admin page.
  2. Paste the adsense code in the box given and save it.
  3. Use [sc name="adsenseAd"] in your posts and pages.
  4. Tada !!! the ad code is replaced and it appears in the post.
  5. Now you can edit the ad code at one place and the code is updated in all the locations where the shortcode is used.

Similarly shortcodes can be created for frequently used snippets.

You can also add custom parameters (like %%id%%) inside the snippets, and change it’s value like [sc name="youtube" id="GrlRADfvjII"] when using them.

🧱 Using in block editor

Aunque los shortcodes se pueden usar en cualquier lugar manualmente, Shortcoder proporciona a continuación opciones para seleccionar e insertar los shortcodes creados fácilmente al trabajar con el editor de bloques.

  • Bloque de Shortcoder
  • Botón de la barra de herramientas para seleccionar e insertar shortcodes integrados (en «más»)

💎 Upgrade to PRO

Shortcoder also provides a PRO version which has additional features to further enhance the experience. Below features are offered in the PRO version.

  • Custom editor – Edit Shortcode content using block editor or page builder plugins like Elementor and WPBakery.
  • (New) Translation with WPML – Translate Shortcode content with WPML.
  • Revisions – Revisions support for Shortcode content.
  • Locate shortcode – Search posts and pages where a shortcode is used.
  • Extra code – Include extra code to the footer when a shortcode is used in a page.

Get started with Shortcoder – PRO

Enlaces

Capturas

Bloques

Este plugin proporciona 1 bloque.

  • Shortcoder

Instalación

  1. Extrae el archivo comprimido y sube la carpeta Shortcoder al directorio /wp-content/plugins/.
  2. Activa el plugin a través del menú Plugins en WordPress.
  3. Open the admin page from the «Shortcoder» link in the navigation menu.

FAQ

Please visit the plugin documentation page for complete list of FAQs.

What are the allowed characters for shortcode name?

Allowed characters are alphabets, numbers, hyphens and underscores.

My shortcode is not working in my page builder!

Please check with your page builder plugin to confirm if the block/place/area where the shortcode is being used can execute shortcodes. If yes, then shortcode should work fine just like regular WordPress shortcodes.

My shortcode is not working!

Please check the following if you notice that the shortcode content is not printed or when the output is not as expected.

  • Please verify if the shortcode content is printed. If shortcode content is not seen printed, check the shortcode settings to see if any option is enabled to restrict where and when shortcode is printed. Also confirm if the shortcode name is correct and there is no duplicate name attribute for the shortcode.
  • If shortcode is printed but the output is not as expected, please try the shortcode content in an isolated environment and confirm if the shortcode content is working correctly as expected. Sometimes it might be external factors like theme, other plugin might conflict with the shortcode content being used.
  • There is a known limitation in shortcodes API when there is a combination of unclosed and closed shortcodes. Please refer this document for more information.

Can I insert PHP code in shortcode content?

No. En este momento el plugin solo es compatible con HTML, JavaScript y CSS como contenido del shortcode.

Can I use block editor or page builders like Elementor, WPBakery to create shortcode?

Yes, this feature is available in the PRO version. You can upgrade to the PRO version to design using custom editor and create shortcode for that.

Reseñas

29 de agosto de 2026 1 respuesta
Description:Hello,I am experiencing an issue with the Shortcoder Gutenberg block. When I add the block to a post and click the "Select shortcode" button, nothing happens.Upon inspecting the browser console, a JavaScript error is triggered immediately upon clicking. I traced it in the debugger and found the exact line causing the issue in index.js.Error Log:Uncaught TypeError: Cannot read properties of null (reading 'value')The problematic code in index.js: onClick: () => { if (window.sc_show_insert) { // The error occurs on the following line: var e = document.getElementById("shortcoder-input-" + s).value; window.sc_show_insert(e, s) } } Cause:document.getElementById("shortcoder-input-" + s) is returning null (likely because the element cannot be found in the DOM, possibly due to the block editor's iframe canvas in newer WP versions), and accessing .value on it throws the TypeError.Steps to Reproduce:Open the Gutenberg block editor (adding a new post/page).Insert the "Shortcoder" block.Click the blue "Select shortcode" button.The UI does not respond, and the console throws the TypeError.Environment & Troubleshooting Performed:To rule out conflicts, I used the official Health Check & Troubleshooting plugin. The issue perfectly isolates to Shortcoder.Active Theme: Twenty Twenty-FourActive Plugins: ONLY Shortcoder (all other plugins disabled via troubleshooting mode)Cache: Completely cleared CDN and local browser caches.Could you please look into updating this DOM selection method to be compatible with the current block editor environment? Let me know if you need any additional information. Thank you!
2 de abril de 2026
Thank you for creating this plugin. I needed a replacement for the excellent but long defunct Reusable Text Blocks plugin by Hal Gatewood. Because for one website there were a couple of sentences I needed to repeat in a few dozen places, and for the other website I created a custom two-column layout and used Shortcoder to place blocks of content within the columns. I appreciate you recently adding the context-sensitive color coding to the HTML editor. I'd like it if I didn't need to fill in the HTML paragraph tags for HTML content, which is different than content I type in to the WordPress Classic editor.
24 de febrero de 2026 2 respuestas
Finally, a plugin like this has appeared in the catalog!
9 de junio de 2025 1 respuesta
Shortcoder is a game-changer for anyone who needs to reuse HTML, CSS, or JavaScript across their site! Creating shortcodes is ridiculously simple – just name it, paste your code, and you're done. Love how it works seamlessly with both classic and Gutenberg editors. The ability to disable shortcodes globally or on specific devices is brilliant for testing. Custom parameters make it super flexible too. Whether you're embedding complex widgets or simple HTML blocks, this plugin saves tons of time. Clean interface, reliable performance – exactly what you need for code management!
16 de marzo de 2025 1 respuesta
This plugin is epic and should be part of WP natively :)Shortcodes can easily be found and edited from the dashboard. No issues on latest version of WP.
Leer todas las 227 reseñas

Colaboradores y desarrolladores

«Shortcoder — Create Shortcodes for Anything» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Shortcoder — Create Shortcodes for Anything» está traducido en 14 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «Shortcoder — Create Shortcodes for Anything» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

6.6

  • New: Setting to allow Editors to browse and insert existing shortcodes from the post editor.
  • Fix: Updated Shortcoder block editor as per the latest API.
  • Fix: Support for WordPress 7.1

6.5.4

  • Fix: Select and insert shortcode popup is available only for administrators.
  • Fix: Custom parameter value will be sanitized by default.
  • Fix: Remove double slash in the JS include URL of the TinyMCE editor button.
  • Fix: Support for WordPress 7.0

6.5.3

  • New: Added general setting to sanitize custom field values before using in shortcode content.
  • Fix: Support for WordPress 6.9

6.5.2

  • Fix: Sanitize custom field value before being inserted into post.

6.5.1

  • Fix: Added null checks to fix warning in some scenarios.

6.5

  • Fix: Support for WordPress 6.8.

6.4

  • New: Option to set shortcode display name next to shortcode name.
  • New: Option to execute WordPress block HTML in shortcode content.
  • Fix: Shortcoder roles are registered when plugin is activated.