Title: P2P Slides
Author: chrisguitarguy
Published: <strong>2012 年 9 月 22 日</strong>
Last modified: 2012 年 9 月 22 日

---

搜索插件

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

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

# P2P Slides

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

[下载](https://downloads.wordpress.org/plugin/p2p-slides.1.0.zip)

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

 [支持](https://wordpress.org/support/plugin/p2p-slides/)

## 描述

**Note:** This plugin requires [Posts 2 Posts](https://wordpress.org/extend/plugins/posts-to-posts/)

Allows you to associate a custom post type (“slides”) with any of your other post

types (defaults to “pages”). This is useful for theme developers of those that want
to add custom sliders around your theme.

This plugin does not provide you out of the box front end functionality. If you’re

looking for a drop in and play slider, this isn’t it.

## 屏幕截图

[⌊The meta box.⌉⌊The meta box.⌉[

The meta box.

## 安装

First, install and active [Posts 2 Posts](https://wordpress.org/extend/plugins/posts-to-posts/).

Then, use the WordPress installer to install this plugin or …

 1. Click the big orrange button to download the plugin
 2. Unzip the plugin files
 3. Upload the `p2p-slides` folder to your `/wp-content/plugins/` directory
 4. Activate the plugin in the admin area

After installing, you should see a new meta box on your edit screen for pages.

If you wish to modify what post types get associated with slides, simply hook into`
after_setup_theme` and add theme support for `p2p-slides`.

    ```
    <?php
    add_action('after_setup_theme', 'my_special_setup');
    function my_special_setup()
    {
        // this is the same as just having the plugin installed
        add_theme_support('p2p-slides');

        add_theme_support('p2p-slides', array('a-post-type', 'another-post-type'));
    }
    ```

To use the slides, you’ll need to check the `slides` property of each `$post`.

    ```
    <?php
    // start the loop as normal
    while(have_posts()): the_post();
    ?>

        <?php if($post->slides): ?>
            We have slides! Loop through them.
            <?php foreach($post->slides as $slide): ?>
                Do stuff with $slide here, it's just a post object
            <?php endforeach; ?>
        <?php endif; ?>

    <?php endwhile; ?>
    ```

You can find a more complete example, in the form of a page template for `twentyeleven`
in the P2P Slides’ `inc` directory.

## 常见问题

  Why no front end prettiness?

Because that’s a theme’s job. This plugin is only meant to provide you with
 tools
to extend your theme or child theme.

  Is this Posts 2 Posts legit?

Yes. [Posts 2 Posts](https://wordpress.org/extend/plugins/posts-to-posts/)
 is amazing.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ chrisguitarguy ](https://profiles.wordpress.org/chrisguitarguy/)

[帮助将「P2P Slides」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/p2p-slides)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0

 * Initial version.

## 额外信息

 *  版本 **1.0**
 *  最后更新：**14 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.4.2 或更高版本 **
 *  已测试的最高版本为 **3.5.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/p2p-slides/)
 * 标签
 * [posts to posts](https://cn.wordpress.org/plugins/tags/posts-to-posts/)[slider](https://cn.wordpress.org/plugins/tags/slider/)
   [slides](https://cn.wordpress.org/plugins/tags/slides/)
 *  [高级视图](https://cn.wordpress.org/plugins/p2p-slides/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ chrisguitarguy ](https://profiles.wordpress.org/chrisguitarguy/)

## 支持

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

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

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.pwsausa.org/give.htm)