이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Simple Tabs Shortcodes

설명

Plugin adds shortcodes to place a page content in tabs. Uses a lightweight JS script, no additional CSS files so you need to add own CSS style to your theme’s stylesheet to ensure proper display of the tabs.

설치

In most cases you can install automatically from plugins page in admin panel.

However, if you want to install it manually, follow these steps:

  1. Download the plugin and unzip the archive.
  2. Upload the entire simple-tabs-shortcodes folder to the /wp-content/plugins/ directory.
  3. Activate the plugin through the Plugins menu in WordPress.

FAQ

Example usage

There are two shortcodes available, below is a simple example of usage:

[tabs]
[tab title="First tab"]The content of the first tab.[/tab]
[tab title="Second tab"]The content of the second  tab.[/tab]
[tab title="Third tab"]The content of the third tab.[/tab]
[/tabs]

This will output the following HTML:

<div class="tabs-container">
    <div class="tabs-nav">
        <ul>
            <li><a href="#first-tab" class="active">First tab</a></li>
            <li><a href="#second-tab">Second tab</a></li>
            <li><a href="#third-tab">Third tab</a></li>
        </ul>
    </div>
    <div class="tabs-content">
        <section id="first-tab" class="tab active">The content of the first tab.</section>
        <section id="second-tab" class="tab">The content of the second tab.</section>
        <section id="third-tab" class="tab">The content of the third tab.</section>
    </div>
</div>

Optionally, you can set a custom ID by adding id="my-id" in tab shortcode.

Example CSS

Here is an example CSS, make the necessary changes if you want to customize the look and feel of tabs.

.tabs-nav {
    margin: 0;
    border-bottom: 1px solid #ccc;
}
.tabs-nav ul {
    list-style: none;
}
.tabs-nav li {display: inline-block;}
.tabs-nav a {
    display: block;
    padding: 5px 10px;
    border: 1px solid transparent;
    text-decoration: none;
}
.tabs-nav a.active {
    border-color: #ccc;
    border-bottom-color: #fff;
}
section.tab {
    display: none;
    margin-bottom: 15px;
    padding: 15px 0;
}
section.tab.active {display: block;}

Selecting a tab by the URL

You can select default tab by using a hash in the URL – simply add #tab-name at the end of the page URL to select the specific tab. This example URL will select tab with the title / id “something”: http://domain.tld/your-page/#something

Switching to the tab by the link

Tabs can be switched by a normal link, just add a class tab-url to the link. Example:

<a class="tab-url" href="#something">Something</a>

후기

모든 4 평가 읽기

기여자 & 개발자

“Simple Tabs Shortcodes”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Simple Tabs Shortcodes”(이)가 2 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Simple Tabs Shortcodes”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.3 (2020-04-08)

  • Pure JavaScript instead of jQuery.

1.2. (2018-08-12)

  • Support non-Latin URLs.

1.1.2 (2018-12-13)

  • Minor fixes.

1.1 (2017-12-07)

  • Changed class name tab-content to tabs-content.

1.0.2 (2017-02-10)

  • Changes in tabs navigation structure.

1.0 (2017-02-09)

  • First public version.