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.
  • Compatible con Gutenberg.

🎲 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.
  • 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

  • Shortcoder admin page.
  • Editing a shortcode.
  • "Insert shortcode" popup to select and insert shortcodes.
  • A shortcode inserted into post.
  • Bloque de Shortcoder for Gutenberg editor.
  • Shortcoder executed in the post.
  • Insertar un shortcode integrado desde la barra de herramientas del editor de bloques.

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

13 de diciembre de 2023 1 respuesta
I've been using Shortcoder for years and it works well for me.
2 de octubre de 2023
Works well, but not compatible with WPML. So, it is good for local businesses only. Also, it did not work in the Cloud Templates (TagDiv/Newspaper), so I could not use it in the header or footer. I don't know if there is a solution to this, I did not investigate this issue further as WPML compatibility is critical.
5 de mayo de 2023 3 respuestas
The plugin is great, unfortunately ot does not interact well with WPML
3 de marzo de 2023 1 respuesta
Thank you for this plugin. It is lightweight, intuitive, and effective. I have used several similar plugins in the past in an attempt to give my clients more content control. However, those plugins either have been abandoned or do not work in some contexts (e.g., in archive pages of custom post types). Shortcoder will be my new go-to.
1 de febrero de 2023 1 respuesta
I've searched high and low for a shortcode plugin to meet my needs. For some reason this plugin never showed up in the first few pages of my plugin search from the Wordpress add plugin page. Instead my searches were inundated with plugins that provided a selection of preset shortcodes for various functions. I was to the point of mapping out writing my own plugin with the features I'd like, sighing at the prospect of yet another project I don't have time for, when I stumbled upon Shortcoder. All I can say is it's exactly what I needed! Adding and managing custom shortcodes was never easier. I even had several instances of "Wouldn't it be cool if this plugin did... oh wait ... IT DOES!" I rarely find software that motivates me to write a 5-star review, well, Shortcoder is one. Kudos to the software engineer(s) and excellent work! By the way, contrary to other reviews, it absolutely works perfectly in Woocommerce product pages.
Leer todas las 215 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 12 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.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

  • New: PRO version is introduced.
  • 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.
  • Fix: Support for WordPress 5.8

5.5

  • Nuevo: Página de ajustes generales para configurar el editor y el contenido por defecto del shortcode.
  • Nuevo: Reescrito desde cero el bloque para insertar el shortcode.
  • Nuevo: Botón de la barra de herramientas para insertar shortcodes integrados.
  • Nuevo: Ahora los shortcodes de cierran por defecto al insertarlos desde el editor.
  • Corrección: Problema del análisis de los campos personalizados cuando se colocaban uno junto a otro.
  • Corrección: El contenido encerrado en la entrada del bloque ahora conserva la multilínea.
  • Corrección: Pequeñas mejoras en la interfaz de usuario.

5.4

  • Nuevo: El editor de código ahora se carga localmente y no desde Cloudflare.
  • Nuevo: Ahora el editor de código muestra sugerencias y resalta cualquier error de sintaxis.
  • Nuevo: Ahora se pueden usar guiones en los parámetros personalizados del shortcode.
  • Corrección: Gestión del escenario en el que, algunas veces, el atributo del shortcode es recibido como una cadena.
  • Corrección: Se ha observado que wp_localize_script era llamado incorrectamente.
  • Corrección: Gestión del escenario en el que el HTML se pasa como parámetro del shortcode.
  • Nuevo: Cambiado el requisito para la versión de WordPress de la 4.4 a la 4.9.

5.3.4

  • Nuevo: Probado hasta WordPress 5.6
  • Corrección: Gestión de la advertencia con trim en algunas páginas al obtener los metadatos de la página.

5.3.3

  • Nuevo: Compatibilidad para post slug como nuevo parámetro del shortcode en la información de WordPress.
  • Nuevo: Codemirror ha sido actualizado a la última versión.
  • Corrección: Gestión del problema de carga del editor de código cuando hay alguna colisión.
  • Corrección: Gestión de los campos de entrada que tienen vacío el atributo id.
  • Corrección: Gestión del problema de que, en algunos casos, el objeto $post sea indefinido.
  • Corrección: Renombrado el uso de __class__ como __CLASS__

5.3.2

  • Nuevo: En el editor de código, los shortcodes serán resaltados y el tamaño de la fuente del editor de código es ligeramente mayor.

5.3.1

  • Nuevo: Ahora el editor de código se ha convertido en el editor por defecto.
  • Corrección: Cambios menores en la interfaz de administración.

5.3

  • Nuevo: Añadida compatibilidad para guiones bajos en los parámetros personalizados.
  • Nuevo: Preparada la internacionalización del plugin.
  • Corrección: La ventana emergente de inserción del shortcode mostraba duplicados los parámetros disponibles en el caso del mismo parámetro con mayúsculas/minúsculas diferentes.

5.2.1

  • Corrección: En algunos escenarios, los parámetros personalizados no eran reemplazados.
  • Corrección: Mejora menor para insertar el formulario de parámetros personalizados.

5.2

  • Nuevo: Ahora se pueden proporcionar valores por defecto para los parámetros personalizados.
  • Corrección: Algunas veces, las etiquetas de los scripts, los marcadores de posición de los campos personalizados y las barras invertidas se eliminaban después de guardar el shortcode.
  • Corrección: Modificado el atributo «rel» para los enlaces.
  • 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.

5.0.3

  • Fix: Shortcode content is not escaped when code editor is used. This is requirement because post_content behaves strangely when user has rich editing enabled.

5.0.2

  • Fix: Shortcodes inside shortcode content not getting executed.
  • Fix: Disable Gutenberg block for older not supported WordPress versions.

5.0.1

  • Fix: Code editor escaping HTML characters.
  • Fix: get_current_screen() undefined.
  • Fix: Code editor breaks if there is any other plugin which loads codemirror.
  • Fix: tools.php is not found.

5.0

  • New: Brand new version. Plugin rewritten from scratch.
  • New: Shortcoder block for the block editor.

4.4

  • New: Insert shortcode automatically adds «closing tag» if the shortcode has enclosed content parameter.
  • Fix: Codemirror has been updated to latest version.

4.3

  • New: Edit shortcode name after creating.
  • New: Post modified date parameter added.
  • Fix: Date parameters now display in site language.

4.2

  • Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
  • Fix: Javascript in insert shortcode popup not working in IE 11.
  • Fix: Missing parenthesis while calling is_year.
  • Fix: Widgets page not loading insert shortcode popup.
  • Fix: Removed settings emoji icon from plugin actions list.
  • Fix: Load latest version 5.42.0 of codemirror.
  • Fix: Updated minimum required WordPress version.

4.1.9

  • Fix: Minor UI refinements for better experience.
  • Fix: Import error where some exported JSON files have 0 as EOF.

4.1.8

  • New: Insert custom fields in shortcode content.
  • Fix: Removed comments in shortcode output

4.1.7

  • New: Categorize, search and filter shortcodes using «tags».
  • New: Last used shortcode editor will be saved along with shortcode.
  • New: Enclosed shortcode content can now be used as shortcode parameter.
  • New: Active line highlight has been enabled for code editor.
  • Fix: Codemirror has been updated to latest version.
  • Fix: Minor admin interface enhancements.

4.1.6

  • New: Date variables can noe be added into shortcode content.
  • Fix: Error «trying to get property of non-object» is handled.

4.1.5

  • New: Bloginfo variables can now be added into shortcode content.

4.1.4

  • New: Codemirror powered syntax highlighted shortcode content code editor (beta).

4.1.3

  • Fix: Shortcode names with not-allowed characters cannot be edited/deleted.
  • New: Shortcode imports made can now be fresh or overwritten.
  • New: Only users with manage_options capability will see «edit shortcode» option in insert window.
  • Fix: Import failure with UTF-8 characters.
  • Fix: Case sensitive search in admin pages.
  • Fix: Minor admin interface changes.

4.1.2

  • New: Search box for shortcodes in admin page.

4.1.1

  • Fix: HTTP 500 error because of syntax error in import module.

4.1

  • New: Import/export feature for shortcodes.
  • Fix: Visual editor is now disabled by default.
  • Fix: Added instructions in admin page.

4.0.3

  • New: Added feature to sort created shortcodes list.
  • Fix: HTML errors in admin page

4.0.2

  • Fix: Sometimes get_current_screen() was called early in some setups.

4.0.1

  • Fix: Servers with PHP version < 5.5 were facing HTTP 500 error because of misuse of PHP language construct in code.

4.0

  • New: Plugin rewritten from scratch.
  • New: Brand new administration page
  • New: Shortcode visibility settings, show/hide in desktop/mobile devices
  • New: Insert WordPress information into shortcode content.
  • Fix: Insert shortcode window is not loading.
  • Fix: Unable to delete the shortcodes

(Older change logs are removed from this list)