Title: Accordion Shortcode
Author: ctltwp
Published: <strong>2012 年 3 月 20 日</strong>
Last modified: 2012 年 9 月 19 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/accordion-shortcode.svg)

# Accordion Shortcode

 作者：[ctltwp](https://profiles.wordpress.org/ctltwp/)

[下载](https://downloads.wordpress.org/plugin/accordion-shortcode.1.2.1.zip)

 * [详情](https://cn.wordpress.org/plugins/accordion-shortcode/#description)
 * [评价](https://cn.wordpress.org/plugins/accordion-shortcode/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/accordion-shortcode/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/accordion-shortcode/#developers)

 [支持](https://wordpress.org/support/plugin/accordion-shortcode/)

## 描述

To make the accordions appear the way you want you need to add your own styling 
to them
 Lets you add accordion to your post and pages.

By using the following shortcodes

    ```
    [accordions]
    [accordion title="title1"] tab content [/accordion]
    [accordion title="title2"] another content tab [/accordion]
    [/accordions]
    ```

will generate the following html.

    ```
    <div id="random-accordion-id-872" class="accordions-shortcode">
                <h3 id="title1-0" ><a href="#title1-0">title1</a></h3>

                <div class="accordian-shortcode-content" >


     Some Text<br />
                </div>

                <h3 id="title2-1" ><a href="#title2-1">title2</a></h3>

                <div class="accordian-shortcode-content " >


     Some Text<br />
                </div>

    </div>
    ```

Additional attributes that you could pass into the shortcode
 [accordions autoHeight
=’true’ disabled=’false’ active=0 clearStyle=false collapsible=false fillSpace=false][
accordion title=’title1′ class=’new-class’] Some Text [/accordion] [accordion title
=’title2′ class=’new-class’] Some Text [/accordion] [/accordions]

### Sample CSS

Here is some sample css to get you started.
 Another place to look for it would 
be the http://jqueryui.com/themeroller/, The shortcode used the jQuery UI to generate
the accordion.

    ```
    .ui-accordion-header{
        margin:5px 0 0;
    }
    .ui-accordion-header a{
        padding:5px 12px;
        background: #CCC; 
        color:#FFF;
        display:block;
    }
    .ui-accordion-header.ui-state-active a,
    .ui-accordion-header a:hover{
        background-color: #DDD;
    }
    .ui-accordion-content{
        padding-top:10px;
    }
    ```

## 安装

 1. Extract the zip file into wp-content/plugins/ in your WordPress installation
 2. Go to plugins page to activate
 3. Add styles to make the accordion look the way you want.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Accordion Shortcode」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ ctltwp ](https://profiles.wordpress.org/ctltwp/)
 *   [ Enej Bajgorić ](https://profiles.wordpress.org/enej/)
 *   [ ctlt-dev ](https://profiles.wordpress.org/ctlt-dev/)
 *   [ ubcdev ](https://profiles.wordpress.org/ubcdev/)

[帮助将「Accordion Shortcode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/accordion-shortcode)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/accordion-shortcode/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/accordion-shortcode/)，或通过[RSS](https://plugins.trac.wordpress.org/log/accordion-shortcode/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/accordion-shortcode/)。

## 更新日志

#### 1.2.1

 * removed php warnings

#### 1.2

Trying to commit the changes from git

#### 1.1

 * improved js loading. js only gets loaded when it is needed
 * fixed bugs

#### 1.0

 * Initial release

## 额外信息

 *  版本 **1.2.1**
 *  最后更新：**14 年前**
 *  活跃安装数量 **500+**
 *  WordPress 版本 ** 3.3 或更高版本 **
 *  已测试的最高版本为 **3.3.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/accordion-shortcode/)
 * 标签
 * [Accordion](https://cn.wordpress.org/plugins/tags/accordion/)[shortcode](https://cn.wordpress.org/plugins/tags/shortcode/)
 *  [高级视图](https://cn.wordpress.org/plugins/accordion-shortcode/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  6 条 5 星评价     ](https://wordpress.org/support/plugin/accordion-shortcode/reviews/?filter=5)
 *  [  2 条 4 星评价     ](https://wordpress.org/support/plugin/accordion-shortcode/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/accordion-shortcode/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/accordion-shortcode/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/accordion-shortcode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/accordion-shortcode/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/accordion-shortcode/reviews/)

## 贡献者

 *   [ ctltwp ](https://profiles.wordpress.org/ctltwp/)
 *   [ Enej Bajgorić ](https://profiles.wordpress.org/enej/)
 *   [ ctlt-dev ](https://profiles.wordpress.org/ctlt-dev/)
 *   [ ubcdev ](https://profiles.wordpress.org/ubcdev/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/accordion-shortcode/)