Page Builder Sandwich에 커스텀 숏코드를 추가하는 방법

작성자

카테고리:

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 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.

따라서 사용자 지정 숏코드나 직접 만든 숏코드를 추가하고 싶다면, 워드프레스 사이트에 설치되어 있는 한 언제든지 추가할 수 있습니다.

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