Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes within posts, pages & widgets
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.
[sc name="my_shortcode"]
in your post/page.[sc name="adsenseAd"]
in your posts and pages.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.
Though shortcodes can be used in any place manually, Shortcoder provides below options to select and insert the shortcodes created easily when working with the block editor.
Shortcoder also provides a PRO version which has additional features to further enhance the experience. Below features are offered in the PRO version.
Get started with Shortcoder – PRO
Shortcoder
to to /wp-content/plugins/
directory.Plugins
menu in WordPress.Please visit the plugin documentation page for complete list of FAQs.
Allowed characters are alphabets, numbers, hyphens and underscores.
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.
Please check the following if you notice that the shortcode content is not printed or when the output is not as expected.
name
attribute for the shortcode.No, right now the plugin supports only HTML, Javascript and CSS as shortcode content.
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.
sc_mod_content
to modify shortcode content before execution.wp_localize_script
was called incorrectly.trim
while fetching page metadata at some pages.post slug
as the new shortcode parameter under WordPress information.id
attribute.$post
object being undefined at some cases.__class__
to __CLASS__
empty()
was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.array_key_exists
array but bool given warning.script
and style
tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.post_content
behaves strangely when user has rich editing enabled.get_current_screen()
undefined.tools.php
is not found.is_year
.manage_options
capability will see “edit shortcode” option in insert window.get_current_screen()
was called early in some setups. (Older change logs are removed from this list)