Shortcodes Generator


Use this tool to create custom code for Shortcodes with add_shortcode() function.


  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.
Shortcode tag in the content.
e.g. [tag]
The function used in the code.
Self-closing shortcode: [tag]
Enclosing shortcode: [tag]content[/tag]
Enable attributes such as
[tag foo="123" bar="456"].
Use "shortcode_atts_{$shortcode}" filter, to allow shortcode attributes filtering.
Set custom filter name.
Attribute name. Lowercase.
Default value.
e.g. [tag attr_name="default_value"]
Attribute name. Lowercase.
Default value.
Attribute name. Lowercase.
Default value.
Custom code to generate the output.
Should only "return" the text, never produce the output directly.
  Save Snippet
// Add Shortcode
function openpro_widget_recherche_shortcode() {

	// Add Shortcode
	function openpro_widget_recherche_shortcode( $atts ) {
		// Attributes
		$atts = shortcode_atts(
		<script type="text/javascript" src="//"></script>
		<script type="text/javascript">
		( function() {
			var widgetProduit = AllianceReseaux.Widget.Instance( "Produit", { idPanier:"xfvFxcU", idIntegration:312, langue:"fr", ui:"OSCA-45949" } );
			widgetProduit.PreApp("dispo.duree", 0 );
			widgetProduit.PreApp("delaiReservation", 1 );
	add_shortcode( 'widget-recherche', 'openpro_widget_recherche_shortcode' );

add_shortcode( 'widget_recherche', 'openpro_widget_recherche_shortcode' );