ວິທີເພີ່ມຊອດໂຄດແບບກຳນົດເອງໃນ Page Builder Sandwich

ຂຽນໂດຍ

ໃນ

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”, ທັງສອງຢ່າງແມ່ນເຮັດວຽກຄືກັນແທ້ໆ: ນັ້ນຄືການເພີ່ມຂໍ້ຄວາມ 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.

ສ່ວນໜຶ່ງຂອງສິ່ງນີ້ໝາຍຄວາມວ່າ ທ່ານບໍ່ຈຳເປັນຕ້ອງຊອກຫາຊອດໂຄ້ດຂອງທ່ານດ້ວຍຕົນເອງໃນເອກະສານ ຫຼື ບ່ອນເກັບຂໍ້ມູນທີ່ກ່ຽວຂ້ອງອີກຕໍ່ໄປ.

ຕາບໃດທີ່ທ່ານໄດ້ຕິດຕັ້ງປລັກອິນທີ່ມີຊອດໂຄ້ດລົງໃນເວັບໄຊທ໌ 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.

ດັ່ງນັ້ນ, ຖ້າທ່ານຕ້ອງການເພີ່ມຊອດໂຄ້ດທີ່ກຳນົດເອງ, ຫຼື ຊອດໂຄ້ດທີ່ທ່ານສ້າງຂຶ້ນເອງ, ທ່ານກໍສາມາດເຮັດໄດ້, ຕາບໃດທີ່ທ່ານໄດ້ຕິດຕັ້ງພວກມັນລົງໃນເວັບໄຊທ໌ WordPress ຂອງທ່ານ.

Here are some other helpful plugins that you can use to create your own custom shortcodes: