From the word itself, the word shortcode means exactly that: A short code; a shortcut code.
Shortcodes මඟින් සංවර්ධකයින් සාමාන්යයෙන් කරන ආකාරයට විශාල කේත කොටස් එක් කිරීමට අවශ්ය නොවී, ඔබගේ වෙබ් අඩවියට දේවල් (උදාහරණයක් ලෙස විජට් වැනි) එක් කිරීමට ඉඩ සලසයි.
උදාහරණයක් ලෙස, දිග අනුව සාමාන්ය කේත කොටසක් බොහෝ විට මෙවැනි විය හැක:
<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>
මෙම උදාහරණය සඳහා, ඉහත කේත කොටස මඟින් ඔබට 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.
දැන් සිතන්න, කේත කොටස් දෙකම– මුල්, දිගු කොටස, සහ “lorem” යන වචනය පමණක් අඩංගු shortcode එක යන දෙකෙන්ම කරන්නේ හරියටම එකම දෙයයි: 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?
ඔබ සතුව ප්රියතම ප්ලගිනයක් හෝ විජට් එකක් තිබේ නම්, බොහෝ විට ඒවායේ ඔබට භාවිත කිරීමට shortcode එකක් තිබිය හැක.
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
Page Builder Sandwich හි, ඔබට ඔබේ අන්තර්ගත ප්රදේශයට shortcodes සෘජුවම ටයිප් කිරීමෙන් හෝ කොපි-පේස්ට් කිරීමෙන් පිටුවට එක් කළ හැක.
Page Builder Sandwich ආදර්ශන පිටුවට අන්තර්ගත කොටුවක් එක් කරමින්, Shortcodes Ultimate වෙතින් ලබාගත් shortcode එකක් මඟින් අපි පහතින් මෙය කළෙමු:
Another thing you’ll find handy when using Page Builder Sandwich is our Shortcode Mapping feature.
Shortcode Mapping පිළිබඳ අපගේ පෙර ලිපියකින්, එහි අර්ථ දැක්වීම පහත පරිදි වේ:
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.
මෙහි එක් අදහසක් වන්නේ, ඔබට තවදුරටත් ඒවාට අදාළ ලියකියවිලි හෝ ගබඩාවන්හි ඔබගේ shortcodes අතින් සෙවීමට අවශ්ය නොවන බවයි.
shortcode එක අඩංගු ප්ලගිනය ඔබගේ wordpress අඩවියේ ස්ථාපනය කර ඇති තාක් කල්, එය 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.
එබැවින් ඔබට අභිරුචි shortcodes හෝ ඔබ විසින්ම සාදන ලද shortcodes එක් කිරීමට අවශ්ය නම්, ඒවා ඔබගේ WordPress අඩවියේ ස්ථාපනය කර ඇති තාක් කල්, ඔබට එය කළ හැක.
