From the word itself, the word shortcode means exactly that: A short code; a shortcut code.
शॉर्टकोड आपको डेवलपर्स की तरह कोड के बड़े हिस्से जोड़े बिना, अपनी वेबसाइट में चीज़ें (जैसे कि विजेट्स) जोड़ने की अनुमति देते हैं।
उदाहरण के लिए, लंबाई के मामले में कोड का एक सामान्य हिस्सा शायद कुछ इस तरह दिखेगा:
<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” शब्द वाला शॉर्टकोड, दोनों बिल्कुल एक ही काम करेंगे: लोरेम इप्सम टेक्स्ट जोड़ना।
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?
यदि आपके पास कोई पसंदीदा प्लगइन या विजेट है, तो संभावना है कि उनके पास आपके उपयोग के लिए एक शॉर्टकोड उपलब्ध होगा।
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 Ultimate) के शॉर्टकोड के साथ नीचे ऐसा किया है:
Another thing you’ll find handy when using Page Builder Sandwich is our Shortcode Mapping feature.
शॉर्टकोड मैपिंग पर हमारे पिछले लेखों में से एक से, परिभाषा इस प्रकार है:
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.
इसका एक हिस्सा यह है कि अब आपको उनके संबंधित दस्तावेज़ों या रिपॉजिटरी पर अपने शॉर्टकोड को मैन्युअल रूप से खोजने की आवश्यकता नहीं है।
जब तक आपकी वर्डप्रेस साइट पर वह प्लगइन इंस्टॉल है जिसमें शॉर्टकोड शामिल है, तब तक यह पेज बिल्डर सैंडविच पर आपके उपयोग के लिए आसानी से उपलब्ध होगा।
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.
इसलिए यदि आप कस्टम शॉर्टकोड जोड़ना चाहते हैं, या ऐसे शॉर्टकोड जिन्हें आपने स्वयं बनाया है, तो आप जोड़ सकते हैं, बशर्ते वे आपकी वर्डप्रेस साइट पर इंस्टॉल हों।
