Shortcoder — Create Shortcodes for Anything

Beschrijving

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.

✍ Maak gemakkelijk shortcodes

  1. Geef een naam aan de shortcode
  2. Plak de HTML/JavaScript/CSS als shortcode inhoud
  3. Opslaan!
  4. Voeg nu de shortcode [sc name="my_shortcode"] in je bericht/pagina in.
  5. Voila ! Je hebt de HTML/Javascript/CSS in je bericht staan.

✨ Functies

  • Maak gemakkelijk klare shortcodes en gebruik ze op elke plaats waar shortcodes worden ondersteund.
  • Heb een HTML, Javascript, CSS als shortcode inhoud.
  • Insert: Custom parameters in shortcode
  • Insert: WordPress parameters in shortcode
  • Multiple editors: Code, Visual and text modes.
  • De shortcode globaal uitschakelen wanneer deze niet nodig is.
  • Schakel shortcode uit op desktop, mobiele apparaten.
  • Een knop in de bericht editor om de shortcodes in te voegen.
  • Execute blocks HTML in shortcode content.
  • Insert shortcodes in Gutenberg/block editor.

🎲 Een voorbeeld gebruik

  1. Maak een shortcode met de naam ‘adsenseAd’ op de Shortcoder beheerpagina.
  2. Plak de AdSense code in het aangegeven vak en sla deze op.
  3. Gebruik [sc name="adsenseAd"] in je berichten en pagina’s.
  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.

Op dezelfde manier kunnen shortcodes worden gemaakt voor veelgebruikte fragmenten.

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.

🧱 Gebruik in de blok-editor

Hoewel shortcodes op elke plaats handmatig kunnen worden gebruikt, biedt Shortcoder onderstaande opties om de gemaakte shortcodes eenvoudig te selecteren en in te voegen wanneer je met de blokeditor werkt.

  • Shortcoder blok
  • Werkbalkknop om shortcodes te selecteren en inline in te voegen (onder “meer”)

💎 Upgrade naar PRO

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

  • Aangepaste editor – Bewerk shortcode inhoud met behulp van blok-editor of plugins voor het maken van pagina’s, zoals Elementor en 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.

Aan de slag met Shortcoder – PRO

Links

Schermafbeeldingen

Blokken

Deze plugin voorziet 1 blok.

  • Shortcoder

Installatie

  1. Pak het gezipte bestand uit en upload de map Shortcoder naar de map /wp-content/plugins/.
  2. Activeer de plugin via het Plugins menu in WordPress.
  3. Open the admin page from the “Shortcoder” link in the navigation menu.

FAQ

Ga naar de plugin documentatie pagina voor de volledige lijst met FAQs.

What are the allowed characters for shortcode name?

Toegestane tekens zijn alfabetten, cijfers, koppeltekens en onderstrepingstekens.

Mijn shortcode werkt niet in mijn pagina bouwer!

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.

Mijn shortcode werkt niet!

Controleer het volgende als je merkt dat de inhoud van de shortcode niet wordt afgedrukt of als de uitvoer niet is zoals verwacht.

  • 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.
  • Als shortcode wordt afgedrukt, maar de output is niet zoals verwacht, probeer dan de shortcode inhoud in een geïsoleerde omgeving en te bevestigen of de shortcode inhoud correct werkt zoals verwacht. Soms kan aan het externe factoren liggen zoals thema, andere plugin zou kunnen botsen met de shortcode inhoud wordt gebruikt.
  • Er is een bekende beperking in shortcodes API wanneer er een combinatie is van niet-gesloten en gesloten shortcodes. Raadpleeg dit document voor meer informatie.

Kan ik PHP code in mijn shortcode inhoud invoegen?

Nee, op dit moment ondersteunt de plugin alleen HTML, Javascript en CSS als shortcode inhoud.

Kan ik een blok-editor of paginabouwers zoals Elementor en WPBakery gebruiken om shortcode te maken?

Ja, deze functie is beschikbaar in de PRO-versie. Je kan upgraden naar de PRO-versie om te ontwerpen met een aangepaste editor en daarvoor shortcode te maken.

Beoordelingen

29 augustus 2026 1 reactie
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 april 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 februari 2026 2 reacties
Finally, a plugin like this has appeared in the catalog!
9 juni 2025 1 reactie
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 maart 2025 1 reactie
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.
Lees alle 227 beoordelingen

Bijdragers & ontwikkelaars

“Shortcoder — Create Shortcodes for Anything” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Shortcoder — Create Shortcodes for Anything” is vertaald in 14 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Shortcoder — Create Shortcodes for Anything” naar jouw taal.

Interesse in de ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

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

  • Opgelost: ondersteuning voor 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.

6.3.2

  • Fix: Verify permissions while closing Shortcoder changelog.

6.3.1

  • Fix: Admin ajax vulnerability with nonce.

6.3

  • New: Set default value for the custom field parameters.
  • New: Custom parameter default value is shown in the insert shortcode popup.
  • Fix: Restrict access to admin-ajax calls.
  • Fix: Some admin texts were missing translation.
  • Fix: Removed the note in the insert popup for fully closed shortcode.
  • Fix: Debug comment line now has the name of the shortcode.

6.2

  • New: Option to show shortcode content in “All shortcodes” page.
  • Fix: Some texts were not translated.
  • Fix: Error in WP Bakery page builder while picking images.

6.1

  • New: Enhancements to shortcode edit screen meta boxes.
  • Fix: HTML is escaped in the editor sometimes.
  • Fix: Support for WordPress 6.1

6.0

  • Nieuw: PRO versie is geïntroduceerd.
  • New: Prevent same shortcode nested loop.
  • New: New actions and filters introduced.
  • Fix: Post excerpt shortcode parameter now prints full post excerpt.
  • Fix: Enhancements to input and output data sanitization.

5.8

  • New: Option to set description for the shortcode.
  • New: New actions and filters introduced.
  • Fix: Minor admin UI enhancements.

5.7

  • New: Reordered shortcode column in the “All shortcodes” page.
  • New: Option to copy shortcode directly from “All shortcodes” page.
  • New: Filter sc_mod_content to modify shortcode content before execution.
  • Fix: Shortcode won’t save if the email field in the feedback form has invalid value.
  • Fix: Custom parameter with hyphen was not highlighted in code editor.
  • Fix: Minor admin UI enhancements.

5.6

  • New: Shortcodes available to copy/insert are now closed by default.
  • Fix: Custom parameter value 0 is not displayed.
  • Opgelost: ondersteuning voor WordPress 5.8

5.5

  • New: General settings page to configure default editor and shortcode content.
  • New: Block to insert shortcode rewritten from scratch.
  • New: Toolbar button to insert shortcodes inline.
  • New: Shortcodes are now closed by default when inserted from editor.
  • Fix: Custom fields parsing issue when they are placed next to each other.
  • Fix: Enclosed content in block input now retains multi-line.
  • Fix: Minor refinements to UI.

5.4

  • New: Code editor is now loaded locally and not from cloudflare.
  • New: Code editor now shows hints and highlights any syntax error.
  • New: Hyphens can now be used in shortcode custom parameters.
  • Fix: Handle scenario where shortcode attribute is received as a string sometimes.
  • Fix: Notice where wp_localize_script was called incorrectly.
  • Fix: Handle scenario where HTML is passed as shortcode parameter.
  • Nieuw: WordPress eis veranderd van 4.4 naar 4.9

5.3.4

  • Nieuw: getest tot WordPress 5.6
  • Fix: Handle warning with trim while fetching page metadata at some pages.

5.3.3

  • New: Support for post slug as the new shortcode parameter under WordPress information.
  • New: Codemirror has been updated to latest version.
  • Fix: Handle code editor loading issue when there is any collision.
  • Fix: Handle input fields which have empty id attribute.
  • Fix: Handle issue of $post object being undefined at some cases.
  • Fix: Renamed usages of __class__ to __CLASS__

5.3.2

  • New: In code editor, shortcodes will be highlighted and code editor font size is slightly bigger.

5.3.1

  • New: Code editor is now made the default editor.
  • Fix: Minor changes to admin UI.

5.3

  • New: Added support for underscores in custom parameters.
  • New: Getting ready for internationalization of the plugin.
  • Fix: Insert shortcode popup shows duplicate available parameters in case of same parameter with different case.

5.2.1

  • Fix: Custom parameters being not replaced in some scenarios.
  • Fix: Minor enhancement to insert custom parameter form.

5.2

  • New: Default values can now be provided to custom parameters.
  • Fix: Script tags, custom field placeholder and backslash being stripped after saving the shortcode sometimes.
  • Fix: Rel attribute being modified for links.
  • New: Added “Manage shortcodes” link to plugin list page for easy access after activation.

5.1

  • New: Import/Export link added to the shortcoder list page.
  • Fix: empty() was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.
  • Fix: Shortcoder QTTags button was loading in frontends.
  • Fix: “Insert shortcode” popup was hidden behind in theme customizer page.
  • Fix: array_key_exists array but bool given warning.
  • Fix: Hide comments metabox in shortcode edit page as it was shown in certain conditions.

5.0.4

  • Fix: script and style tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.