From the word itself, the word shortcode means exactly that: A short code; a shortcut code.
Gli shortcode ti consentono di aggiungere elementi al tuo sito web (come i widget, ad esempio), senza dover inserire enormi blocchi di codice come farebbero normalmente gli sviluppatori.
Ad esempio, un normale frammento di codice, in termini di lunghezza, avrebbe probabilmente un aspetto simile a questo:
<html>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam id aliquam turpis. Vivamus quis arcu tincidunt, finibus urna eget, placerat risus. Aliquam arcu massa, finibus et lacinia sed, scelerisque nec augue. Quisque eu viverra sapien, vel consequat lorem. Integer vel erat tortor. Phasellus condimentum magna eget congue venenatis. Suspendisse blandit vehicula consectetur. Nullam sodales eleifend massa, in bibendum purus fermentum id. Morbi et turpis feugiat, malesuada ipsum sit amet, interdum nulla. In non ante nec nisl mattis gravida sit amet id lectus. </html>
Per questo esempio, facciamo finta che il frammento di codice sopra ti permetta di aggiungere un intero paragrafo di testo segnaposto Lorem Ipsum.
Now, a shortcode with the same exact function as the code above will look something like this, in contrast:
[lorem ipsum dolor estat]Lorem Ipsum[/lorem]
You can see how they’re miles different from each other in terms of length.
Ora immagina che entrambi i frammenti di codice – il frammento originale e lungo, rispetto allo shortcode contenente solo la parola “lorem” – facciano esattamente la stessa cosa: aggiungere testo Lorem Ipsum.
This is what shortcodes do. They make adding widgets, functions, and a bunch of other cool stuff easier for both ordinary WordPress users and developers alike.
Where can I find shortcodes?
Se hai un plugin o un widget preferito, è molto probabile che abbiano uno shortcode disponibile da utilizzare.
Shortcodes Ultimate, for example, will let you choose from hundreds of shortcodes that you can use on Page Builder Sandwich (or anywhere, actually) by simply grabbing the shortcode of your choice from Shortcode Ultimate’s repository or documentation page.
Adding Custom Shortcodes on PBS
Su Page Builder Sandwich, puoi aggiungere shortcode direttamente sulla tua pagina semplicemente digitandoli o incollandoli nella tua area di contenuto.
Lo abbiamo fatto qui sotto con uno shortcode di Shortcodes Ultimate, aggiungendo un riquadro di contenuto nella pagina demo di Page Builder Sandwich:
Another thing you’ll find handy when using Page Builder Sandwich is our Shortcode Mapping feature.
Da uno dei nostri articoli precedenti su Shortcode Mapping, la definizione è la seguente:
Shortcode mapping is like letting Page Builder Sandwich memorize all the shortcodes available on your site: their names, descriptions, their attributes, and what each of these attributes do.
Ciò significa in parte che non dovrai più cercare manualmente i tuoi shortcode nelle rispettive documentazioni o repository.
Finché avrai il plugin che include lo shortcode installato sul tuo sito WordPress, sarà facilmente disponibile per l’uso su Page Builder Sandwich.
So for example, if I wanted to add a WooCommerce shortcode on my page, all I have to do is make sure that it’s installed on my WordPress site, like so:
And then, to actually add the shortcode, I’ll just go to my page, and drag and drop the Shortcode Element:
Because we already have WooCommerce installed on our WordPress site, you can see that all of the shortcodes that are available on the WooCommerce plugin are already available on Page Builder Sandwich. This is what Shortcode Mapping is.
You can also see on the upper left corner that the ACF (Advanced Custom Fields) and MailChimp shortcodes are available– because we have those instlled on our WordPress site, too.
Quindi, se vuoi aggiungere shortcode personalizzati o shortcode creati da te, puoi farlo, purché tu li abbia installati sul tuo sito WordPress.



Ci sono dozzine e dozzine di page builder là fuori, e sicuramente ti starai chiedendo: 


Questo articolo fornirà una breve panoramica su come funziona Page Builder Sandwich ed è pensato come introduzione per chi è interessato a capire come il nostro page builder si integra con i diversi elementi di WordPress. Non mi soffermerò sulle singole funzionalità di Page Builder Sandwich; se vuoi scoprirle, visita la nostra pagina dei video in cui mostriamo ogni funzionalità singolarmente con brevi screencast.

