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”، سيؤديان نفس الغرض تماماً: إضافة نص 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?
إذا كان لديك إضافة أو عنصر واجهة مستخدم مفضل، فمن المحتمل أن يكون لديهما رمز قصير متاح لك لاستخدامه.
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، حيث أضفنا مربع محتوى على الصفحة التجريبية لـ Page Builder Sandwich:
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.
يعني جزء من هذا أنك لم تعد مضطراً للبحث يدوياً عن رموزك القصيرة في وثائقها أو مستودعاتها المعنية.
طالما أن لديك الإضافة التي تتضمن الرمز القصير مثبتة على موقع ووردبريس الخاص بك، فسيكون متاحاً لك بسهولة للاستخدام على 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.
لذا، إذا كنت ترغب في إضافة رموز قصيرة مخصصة، أو رموز قصيرة أنشأتها بنفسك، فيمكنك ذلك، طالما قمت بتثبيتها على موقع ووردبريس الخاص بك.



هناك العشرات بل المئات من أدوات إنشاء الصفحات المتوفرة، ولابد أنك تسأل نفسك: 

إذا كنت مدوناً متحمساً ويتمحور كل ما تنشئه من محتوى حول كتابة مقالات كاملة تتضمن صوراً توضيحية من حين لآخر، فربما يكون محرر المحتوى الحالي TinyMCE كافياً لاحتياجاتك. تحتوي مجموعة الأدوات الحالية بالفعل على الأدوات اللازمة لكتابة المقالات، فلديك أدوات تنسيق النصوص الأساسية مثل الخط العريض والمائل والعناوين وما إلى ذلك. ولكن هذا كل شيء تقريباً.